Does Touching the Opposite Gender Break the Fast?
Question

What is the ruling on touching women with one's hand only during Ramadan and the emission of semen as a result?
Praise be to Allah.Is touching non-mahram women haram?
The ruling on touching non-mahram women is that it is haram, during Ramadan and at other times, whether that is touching with the hand only or actions that are more serious than that. Prophet Muhammad (peace and blessings of Allah be upon him) said: “If one of you were to be stabbed in the head with an iron needle, that would be better for him than his touching a woman who is not permissible for him.” (Narrated by al-Tabarani in al-Kabeer, 486; classed as sahih by al-Albani in Sahih al-Jami’, 5045.) 
Sins in general – including touching (non-mahram) women – are more serious in Ramadan. They detract from the reward of fasting , and may even spoil the fast altogether so that the fasting person gets nothing from his fast except hunger and thirst. Hence the fasting person is told most emphatically to avoid sin.  
The believer should make the most of Ramadan to set himself straight, to repent from sin and to turn to Allah . The day when he fasts and the day when he does not fast cannot be the same. 
Jabir ibn ‘Abd-Allah (may Allah be pleased with him) said: When you fast, then let your hearing, sight and tongue fast and abstain from lies and haram things, and refrain from harming your neighbour. Be tranquil and dignified on the day when you fast, and do not let the day when you fast and the day when you do not fast be the same. (Narrated by Ibn al-Mubarak in al-Zuhd, 1308) 
Does shaking hands with women break your fast?
If a man shakes hands with a woman during the day in Ramadan, and he ejaculates, his fast is invalidated, and there is no difference of opinion among the scholars on this point. He has to repent to Allah from this sin, refrain from eating and drinking for the rest of the day, and make up for that day’s fast later on. (See al-Mughni by Ibn Qudamah, 4/361) 
Ruling on emission of semen while fasting
With regard to emission of semen whilst fasting, if that happens without desire , e.g. because of sickness, then it does not affect the fast. 
The Standing Committee was asked: 
I suffer from seminal discharge during the days in Ramadan without any wet dreams or engaging in the “secret habit” (masturbation).  Does this have any effect on the fast? 
They replied: 
“If the matter is as described, the emission of semen without any feelings of pleasure during the day in Ramadan does not affect your fast, and you do not have to make up that day.” (Fatawa al-Lajnah al-Daimah, 10/278) 
Scenarios of emission of semen by desire
But if the emission of semen is accompanied by desire, one of two scenarios applies: 

That happens because the man does something that provokes his desires, such as kissing his wife, shaking hands with a woman with desire, etc. This invalidates the fast and he must make up that day later on. 
The semen is emitted without the man doing anything, such as simply thinking about desire, or because of a wet dream. This does not invalidate the fast and his fast is still valid. 

Shaykh Ibn Baz (may Allah have mercy on him) said: 
“With regard to the emission of semen as the result of desire, this invalidates the fast whether that happened because of touching or kissing or repeatedly looking, or any other reason that provokes desire, such as masturbation etc. With regard to wet dreams and thinking, these do not invalidate the fast even is semen is emitted as a result.” (Fatawa Islamiyyah, 2/135) 
And Allah knows best.