Originally, the best option when it comes to shaking hands among members of the opposite sex is that one avoids doing so; especially when there are any moral qualms about it.
In case, there is no fear of temptation, and at the same time shaking hands is a customary practice in a certain society or community, then one may get over with it. The issue is, by and large, judged by one’s conscience.

Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states the following: This is one of those issues one should decide based on one’s conscience and the circumstances. It is best for us to avoid shaking hands with members of the opposite sex in case there are any moral qualms about it. It is best that we do what our conscience tells us; we can always explain our position later. If, however, there is nothing to suggest a source of temptation, then you may just get over with it, especially in a society or group where it is a custom. The latter would be the case if we are dealing with societies where shaking hands with everyone, regardless of male and female differences, is customary.
It is in the last mentioned case that even some of the jurists of the early times considered shaking hands with females as permissible, provided there is no temptation factor involved. Imam Ibrahim An-Nakh`ie was of this view, as is reported from him.
So decide for yourself; if it bothers you, then don’t do it. But if you are faced with a society where it is considered strange and unfriendly not to do so, then just do it and get over with it.
Having said this, however, I must rush to add that in Islamic societies nurtured by the sound teachings of Islam, it should not pose a problem for you if you were to refuse to shake hands with men. For in this case, the latter rather than the former, is the norm.