Ruling on inserting a finger into the rectum to deal with constipation; does that affect the fast?
Question

                I am suffering from constipation. Is it permissible for me to insert my finger into my rectum whilst relieving myself, to help with the process of expulsion? Is this action permissible if I am fasting, whether it is an obligatory or involuntary fast?
Praise be to Allah.
    With regard to whether inserting the finger 
    into the rectum when fasting breaks the fast or not, there is a difference 
    of opinion. Some of the scholars are of the view that if the fasting person 
    inserts his finger into his rectum, he breaks his fast by doing that. 

    Shaykh Zakariyya al-Ansaari (may Allah have 
    mercy on him) said: If he inserts a finger into his rectum, he breaks his 
    fast. The same applies if someone else does that to him with his permission. 
    So he should be careful when cleaning himself after relieving himself, and 
    not let the tip of his finger enter the rectum, because if any part of the 
    finger enters it, his fast will be broken. 

    End quote from Asna al-Mataalib 
    (1/5/416) 

    The second view is that the fast is not 
    broken by anything that is inserted via the rectum, because it is not akin 
    to food and drink. Among those who favour this view was Shaykh al-Islam Ibn 
    Taymiyah (may Allah have mercy on him). 

    Shaykh Muhammad ibn ‘Uthaymeen (may Allah 
    have mercy on him) said in ash-Sharh al-Mumti‘ (6/369): The more 
    correct view concerning this matter is definitely that of Shaykh al-Islam 
    Ibn Taymiyah, regardless of what some contemporary scholars say. 

    One of the common forms of medical treatment 
    nowadays is that which is placed in the rectum (suppository) when the 
    patient is suffering a high fever; a thermometer may also be inserted into 
    the rectum to find out the patient’s temperature; and there are other 
    things. None of these things breaks the fast. 

    Moreover we have an important basic 
    principle for the seeker of knowledge, which is that if we are uncertain as 
    to whether anything breaks the fast or not, the basic principle is that it 
    does not break the fast. End quote. 

    For more information, please see the answers 
    to questions no. 22959 and 37749. 

    According to this view, the one who inserts 
    his finger into his rectum does not break his fast, according to the view 
    that is most likely to be correct, because there is nothing in this action 
    to indicate that the fast is broken. 

    However we should point out that the basic 
    principle is to protect the ‘awrah from such things. Whatever illness you 
    have, there are treatments, remedies, and laxatives which you can use, 
    instead of doing this off-putting action. We do not know of any doctor who 
    would advise such a thing or tell a patient to do it. So you should consult 
    some doctors who specialise in such matters, and perhaps they will tell you 
    about something that will be beneficial in your case. 

    Please see also the answer to question no.
    20671 

    We ask Allah to heal you from what you are 
    suffering, for He is Munificent, the Most Generous. 

    And Allah knows best.