Yes, sort of. You will need to find a local gun shop to receive the gun for you from the out-of-state dealer. Then contact the out-of-state dealer and give them your local gun shops contact information. The out-of-state dealer will ship it to your local shop and When the gun arrives you will go to your local dealer and do all the paperwork. Most shops charge a fee for the transfer, so check to make sure the added fees aren't eating up the money you thought you were saving on the gun.
If you are talking about an in-person transaction, you can't buy a handgun in a state that you are not a resident. Shotguns and rifles are OK to sell to a non-resident unless the state law prohibits it.
In the beginning, the patriot is a scarce man -- brave, hated, and scorned. But when his cause succeeds, the timid join him. For then, it costs nothing to be a patriot. -- Mark Twain