Islam brought clear guidelines to regulate the relationship between a man and a woman who is a stranger (non-mahram) to him and to prevent the occurrence of any fitnah (temptation) to him or to her. That includes the following:
1. Prohibition on being alone with a member of the opposite sex
because the Prophet (blessings and peace of Allah be upon him) said: “No man is alone with a woman except the third one present is the Shaytaan.” Narrated by at-Tirmidhi (2165); classed as saheeh by al-Albaani in Saheeh at-Tirmidhi.
According to another report: “Whoever believes in Allah and the Last Day, let him not be alone with a woman who does not have a mahram with her, for the third one present will be the Shaytaan.”
Narrated by Ahmad; classed as saheeh by al-Haakim and adh-Dhahabi agreed with him. Classed as saheeh by al-Albaani in Ghaayat al-Maraam (180)
2. Prohibition on shaking hands and touching
because the Prophet (blessings and peace of Allah be upon him) said: “For one of you to be stabbed in the head with an iron needle is better for him than touching a woman who is not permissible for him.”
Narrated by at-Tabaraani from the hadith of Ma‘qil ibn Yasaar; classed as saheeh by al-Albaani in Saheeh al-Jaami‘ no. 5045.
3. Prohibition on a man looking at a woman
because Allah, may He be exalted, says (interpretation of the meaning):
“Tell the believing men to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts, etc.). That is purer for them. Verily, Allah is All-Aware of what they do.
And tell the believing women to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts, etc.) and not to show off their adornment except only that which is apparent”
[an-Noor 24:30-31].
In Saheeh Muslim (2159) it is narrated that Jareer ibn ‘Abdullah (may Allah have mercy on him) said: I asked the Messenger of Allah (blessings and peace of Allah be upon him) about an accidental glance and he instructed me to avert my gaze.
As for a woman looking at a man without desire, it is permissible according to the more correct opinion.
4. Prohibition on speaking softly in the case of women
because Allah, may He be exalted, says (interpretation of the meaning):
“then be not soft in speech, lest he in whose heart is a disease (of hypocrisy, or evil desire for adultery, etc.) should be moved with desire, but speak in an honourable manner”
[al-Ahzaab 33:32].
5. Obligation to cover the ‘awrah
and the woman’s ‘awrah in front of non-mahram men is all of her body, including the face and hands.
These guidelines apply to the interaction of a woman with any man who is a stranger (non-mahram) to her, even if he is a relative, such as her cousin (son of her paternal uncle or son of her maternal aunt). In fact she should be more cautious and prudent when interacting with relatives, because a relative is seen frequently, as he comes and goes a great deal, which helps to give rise to fitnah if the guidelines outlined above are not followed. Hence the Prophet (blessings and peace of Allah be upon him) said: “Beware of entering upon women. A man from among the Ansaar said: O Messenger of Allah, what about the in-law? He said: “The in-law is death.”
Narrated by al-Bukhaari (4934) and Muslim (2172).
The word translated here as in-law refers to the husband’s brother, cousin and other similar relatives.
As for simply greeting with salaam, without shaking hands, or speaking when necessary without any softness of speech, or being in the same place, so long as proper covering is observed and being alone together is avoided, there is nothing wrong with that.
In some societies, for a woman to adhere to these guidelines may appear strange, because of lack of knowledge and the prevalence of those who are too lenient. So the woman should be patient, and explain and clarify the rulings to the best of her ability.