Hi Bec , look both men and women have testosterone, and I think you will find that if he is useing gel then its quite possible that he is useing it on his p***s, so unless you've been touching that you should be OK, like did google it, and yes they do say prenant women should not be useing it, but if you google testosterone gel and women you get a differant results, so the picture gets even more confusing.
But just shaking hands your safe.
I think it's more if you're using it that it would be harmful, but remember, just a little bit can hold a lot and diffuse over time, so if you were to get it on you, do wash it off. Just be careful of touching your friend's shoulder area if he's wearing a sleeveless shirt. Otherwise, you'll be fine.