What is the ruling on fasting?
Fasting in Ramadan is an individual obligation (Fard ‘Ayn) upon every mature, sane Muslim who is capable of fasting.
Fasting can also be recommended (Mustahabb), such as voluntary fasting on Mondays and Thursdays, fasting on the Day of Arafah for those not performing Hajj, and fasting on Ashura.
Fasting can be prohibited (Haram), such as fasting on the two Eid days, the Day of Doubt (Yawm al-Shakk), and the Days of Tashreeq.
Some types of fasting are disliked (Makruh), such as singling out Friday or Saturday for fasting without a specific reason and fasting on the Day of Arafah for a pilgrim.
What is the ruling if someone wipes his head then shaves it - must he repeat it?
If a person performing ablution shaves his head after wiping it during ablution, he is not required to re-wipe his head or repeat the ablution. And Allah the Almighty knows best.
Does undergoing an endoscopy during the day in Ramadan affect the validity of fasting?
Undergoing an endoscopic procedure during the day in Ramadan—whether through the mouth, nose, front private part, or back private part—invalidates the fast.
Whoever undergoes such a procedure must refrain from eating and drinking for the rest of the day out of respect for the sacred month and make up for that day after Ramadan.
Is "Bismillāhir-Raḥmānir-Raḥīm" a verse (āyah) of Sūrat al-Fātiḥah?
All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
The basmalah ("Bismillāhir-Raḥmānir-Raḥīm") is, without question, a verse (āyah) of the Noble Qur'an, and according to the Shāfi‘ī school, it constitutes a verse of Sūrat al-Fātiḥah itself. Al-Fātiḥah is a pillar of the prayer, and it consists of seven verses, of which the basmalah is one. The prayer is not valid without reciting it, nor if any of the Fātiḥah's verses, letters, or shaddahs (consonant doublings) are omitted or altered.
It is stated in Bushrā al-Karīm (Vol.1/p.202), from the books of the Shāfi‘ī school: "The basmalah is a complete verse of it [i.e., of al-Fātiḥah] in practice — and it suffices, for this to be established, that there be strong probability (ẓann), especially given that this has come very close to certainty (yaqīn), due to the consensus (ijmā‘) of the Companions on its inclusion in the muṣ-ḥaf [the written text of the Qur'an] in its script, despite their extreme diligence in excluding from it anything that did not genuinely belong to it — to the point that they even [carefully regulated] its diacritical dots and vowel markings." And Allah, the Exalted, knows best.