Assalamu Alaikum, In many situations, shaking hands is a formality, as long as there is no fear of temptation or desire, I don't see the harm in it. So for instance if say you had a job interview and the interviewer was of the opposite gender and they put their hand out to shake with yours, that I think is fine. However, if you're at uni and a fellow student (of the opposite gender) says hi and puts their hand up for a high five, tell them you don't shake hands with people of the opposite gender. Walaikum Asalam.