To me it all depends on what the gun is going to be used for. If you just want it for home defense to have it sit under your bed or whatever until the need arises, get a revolver. You can't go wrong with one, they require very very little cleaning, and go bang every time. If you plan on going target shooting and such with it, depending on whether or not you are going to clean it and maintain it, i'd say either a glock/springfield xd, or a 1911 .45. If you don't plan or don't know how to clean a gun, but still want to shoot it for fun, go with a glock or springfield. They have been field tested through mud, rain, dust, dirt, uncleaned for thousands of rounds, and still go bang when the trigger is pulled. (personally i'd never own one because i believe guns should be steel, not plastic). And finally if you know how to care for a firearm, i.e., cleaning after every use, i'd look into a 1911. You'll spend more money, but imo, you'll get more bang for your buck. The design has been around for years (since 1911), and has had very minimal design changes, i.e., its a fantastic weapon design, that works every time. Plus, imo, they look better than glocks or revolvers.
I'm not big into shotguns, so i can't give much input on them, other than for home defense they work great depending on the circumstance. The only thing you gotta worry about with a shotgun is where the bad guy is, and what the spread pattern of the pellets is going to cover. If the bad guy is standing in front of a childs room or something, a shotgun with a wide pellet spread could cause accidental injuries to family.
One person on here mentioned using an m4. Not to say this is stupid or wrong, because i know many people who use one for home defense, its not something i recommend. The 5.56 round's ballistics are such that if you miss the bad guy, the bullet could go through your walls, across the street, through the nieghbors walls, and do some serious damage. Also, the 5.56 is a round that was designed by the U.S. to wound people, not kill. Of course if placed properly, it will kill, but it was desinged to travel at speeds fast enough to go through the body, where other rounds were made to hit the body and fragment, doing more damage.
All this being said (probably more than you wanted to know), brands i'd recommend looking at for pistols with decent prices would be glock, springfield xd and cz. Caliber wise i'd look at 9mm or .45. unless your looking at a revolver, then i'd say .38.
Sorry if this was to much info, just tryin to help out.