Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada , states: “We are required to do our best to fear Allah as best as we can. The best approach is to consult your own conscience. The Prophet (peace and blessings be upon him) is reported to have said, “Consult your own conscience, even if they give you a fatwa!”
Shaking hands with females should be avoided altogether in Islamic cultures; in other cultures where it is considered a custom, you may do it and get over with it, as long as you are clear in your conscience not to have any lustful thoughts. It is because of this that we find that some jurists like Imam Ibrahim Nakha’ee considered it as permissible to do so.
You can follow the above ruling of Imam Nakha’ee as long as your conscience is clear.
Having said this, I must also point out: In cultures or situations where avoiding it will not pose a problem, you are better advised not to do it.”