Take the classes first. That is if guns are available to try.
For a first handgun I recommend a .22lr. If you can afford one a S&W M617 or M41. The Ruger Mk III or Browning Buckmark are good medium priced handguns.
A .22 is cheap to shoot and easy to learn with. They are also fun.
Take your time picking out a centerfire handgun. There are lots to choose from and the odds are you're not going to be happy if you buy quickly.