Is It Permissible to Shake Hands with Opposite Gender?
Question

Is it allowable for a Muslim woman to greet a Muslim man by shaking hands?
Praise be to Allah.It is not permitted at all for a man to shake hands with a non-Mahram woman . Among the evidence for this is the Hadith of Ma`qal ibn Yasar (may Allah be pleased with him) who said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: `If one of you were to be struck in the head with an iron needle, it would be better for him than if he were to touch a woman he is not allowed to.” (Reported by At-Tabarani; classed as authentic by Al-Albani in Sahih Al-Jami`, 5045)
There is no doubt that for a man to touch a non-Mahram woman is one of the causes of Fitnah (turmoil, temptation), provocation of desire and committing prohibited deeds. 
No one should say that their intention is sound or their heart is clean, because the one who was the purest of heart and the most chaste of all, the Messenger of Allah (peace and blessings of Allah be upon him) never touched a non-Mahram woman, even when accepting Bay`ah (oath of allegiance) from women. He did not hold their hands when accepting their Bay`ah, as he did with men; their Bay`ah was by words only, as was reported by his wife `Aishah (may Allah be pleased with her). She said that the Messenger of Allah (peace and blessings of Allah be upon him) would test the believing women who emigrated to him with the verse  (interpretation of the meaning): “O Prophet! When believing women come to you to give you the Bay`ah, that they will not associate anything in worship with Allah, that they will not steal, that they will not commit illegal sexual intercourse, that they will not kill their children, that they will not utter slander, intentionally forging falsehood (i.e., by making illegal children belong to their husbands), and that they will not disobey you in any Ma`ruf (Islamic monotheism and all that which Islam ordains), then accept their Bay`ah and ask Allah to forgive them. Verily Allah is Oft-Forgiving, Most Merciful.” [Al-Mumtahinah 60:12] `Aishah said: “So whoever of the believing women agreed to these conditions, the Messenger of Allah (peace and blessings of Allah be upon him) would say to her: `I have accepted your Bay`ah by words.` By Allah, his hand never touched the hand of any woman when accepting their Bay`ah; he accepted their Bay`ah by saying `I have accepted your Bay`ah on this basis.`” ((Reported by Al-Bukhari, 4512) 
According to another report, he accepted their Bay`ah by words… the hand of the Messenger of Allah (peace and blessings of Allah be upon him) never touched the hand of any woman except a woman he owned. (Reported by Al-Bukhari, 6674)
Some Muslims feel too embarrassed to refuse when a woman offers her hand to them. In addition to mixing with women, some of them claim that they are forced to shake hands with fellow-students and teachers in schools and universities, or with colleagues in the workplace, or in business meetings and so on, but this is not an acceptable excuse. 
The Muslim should overcome his own feelings and the promptings of the Shaytan, and be strong in his faith, because Allah is not ashamed of the truth. 
The Muslim could apologize politely and explain that the reason he does not want to shake hands is not to offend or hurt anybody`s feelings, but it is because he is following the teachings of his religion. In most cases this will earn him respect from others. There is no harm done if they find it strange at first, and it may even be a practical opportunity for Da`wah.
For more details, please refer to the following answers: 69824 , 8531 , 30791 , and 38153 .
And Allah knows best.