Visiting relatives if it results in doing something prohibited
Question

When I visit my maternal aunt or paternal aunt, her daughters sit with us and I am forced to shake hands with them. If I do not shake hands with them, my aunt tells me off and gets angry with me. Is it permissible for me to stop visiting my aunt unless she is alone, or not?
Praise be to Allah.Upholding ties of kinship is obligatory according to Islamic teachings, and paternal and maternal aunts are among those on whom there is an emphasis on upholding ties with them, so long as that does not result in any wrongdoing, such as the presence of the aunt’s daughters, to whom you are not a mahram, as mentioned in the question, and you are not able to object to them regarding what they do that is contrary to Islamic teachings. You have to choose appropriate times to visit your aunts and similar relatives, when you will be safe from having to mix with those who are not your mahrams. You should explain the Islamic ruling to your aunt and similar relatives, and tell them that it is not permissible for a man to shake hands with women who are not his mahrams.
And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote.
Shaykh `Abd al-`Aziz ibn Baz, Shaykh `Abd al-`Aziz Al ash-Shaykh, Shaykh `Abdullah ibn Ghadyan, Shaykh Salih al-Fawzan, Shaykh Bakr Abu Zayd
Fatawa al-Lajnah ad-Da’imah li’l-Buhuth al-‘Ilmiyyah wa’l-Ifta’, 25/342.