Shaking hands of the opposite gender in Islam is nothing to do with whether someone is Muslim or not. Most likely Muslims will not shake hands with Muslims of the opposite gender as well as non-Muslims. A Muslim man or woman will shake the hands of the same gender whether they are Muslim or non-Muslim. This explains why Muslims do not shake hands of those of the opposite gender.