I think you can get HPV from touching someone who has active infection
Viruses like HPV and HSV (herpes simplex) have "preferences" for certain sites on the body. For example, HSV-1 prefers the mouth, while HSV-2 prefers the genitals. When a non-preferred part makes contact with an infected site, the chances of the virus taking hold in the former tends to be much lower than if it were instead a preferred part. My understanding is that a stain of HPV that prefers the genitals taking hold in a hand would be highly unlikely, at best. The warts that prefer the hand/fingers is an entirely different strain.
To answer the OP: If it's a truly straightforward handie, it should not put you at considerable risk for any STI, as far as I know. But there are other circumstances that can be joined to the handie that would produce risk (e.g. if you put seminal fluids in your mouth from your hand, if you touched your own genitals without washing his fluids off first, if there was for some reason blood, etc).