I am no expert, but my understanding is the only legal way is to go through a FFL in your state of residence.
The question will is how will the FFL you use accept the handgun.
Your friend can legally ship it to them. But some FFLs will only take firearms shipped by other FFLs or manufactures.
If that is the case your friend could take it to a FFL in his state and ask them to ship it.
Granted all that adds time and expense to the transaction.
If the FFL will accept it AFAIK though the friend could take it to your FFL and hand it to them and then go from there.
The main thing is that you fill out from 4473 and all the other "stuff" before you take possession.