Question:
What is the ruling for a fasting person who speaks with a non-Mahram woman or touches her hand during the days of Ramadan? It should be noted that such situations often occur in marketplaces and shops.
Answer:
If a man speaks to a non-Mahram woman without any suspicious intent or desire for pleasure, but rather for business transactions, seeking information about directions, or other necessary matters, then it is permissible. Similarly, if he unintentionally touches a woman's hand without deliberate intent, it is also permissible, whether in Ramadan or outside of it.
However, if the conversation is for the sake of pleasure or enjoyment, then it is prohibited both in Ramadan and outside of it. Yet, during Ramadan, the prohibition becomes even more severe.
— Permanent Committee for Islamic Research and Ifta (اللجنة الدائمة)