A few follow-up notes from the post below.
Remember the guy from Doomsday Preppers who almost blew off his thumb? He's selling a $450 collection of 10 caliber adapters for single shots. Check it out here at Soldier Systems. Lots of people trying to cash in and sell stuff for the "survival" single shot. Think carefully before you drop your dough.
Quick run-down of the sub-$400 options out there (for long guns):
One at under $200 that I haven't mentioned - the Hi-Point Carbine, which is hideously ugly, but is also cheap and apparently runs without troubles. I wouldn't buy one, but have heard good things in general about them.
Outside of a $200 price, you get into more pump action shotguns, and you can definitely get into a 10/22.
At around $300, more shotguns. I think $300 is the going rate for SKSs nowadays, too. Sad - they were a great buy at $150. Entry level bolt action deer guns here, too. But, you've generally got to throw a scope on those (no iron sights), so that generally knocks them outside of $400. The Kel-Tec Sub-2000 series of pistol caliber carbines are around $300, too.
At $400, you used to be able to get an entry level AK-47, but it looks like you're at at least $500 for those now. So $400 gives us some pretty nice shotguns, some more entry level bolt actions and we start getting into lever guns. You can also get into some of the WWII submachine guns like the Suomi and the Sterling, though I've heard mixed reviews of the quality on these kit guns, and they're a bit over $400 - around $420 from a little bit of price shopping. But most of the lever guns are a hair over $400, so we'll call it a wash.
So...shotguns at a variety of price points. Shotguns can do a lot - big game, small game, birds, bad guys. The range limitations aren't as big a deal when we're talking self defense, and in anything less than a near total collapse scenario. Heavy ammo issues don't matter as much in a home defense or bug in scenario. If you've got under $400 to play, a pump action shotgun is a pretty good choice.
A lot of people like bolt guns for all-around, knock around guns. As mentioned, you need to scope 'em, but let's say you found a deal on a used one or bought one for $300 and threw a $100 scope on it. Lots will dismiss bolt guns as long range only, but properly set up and with a good shooter, they can work for closer ranges too. Here's a pretty good example from some boar hunting in Europe - he's running a hunting-model Aimpoint and mowing down boar left and right. A bolt gun should have good accuracy, range and plenty o' stopping power if you need it. If you get into reloading or subcaliber inserts, you can press it into service for small game, or rely on a sidearm for bunny duty.
A lever gun ain't a bad choice, and they come with iron sights, too! 30-30 is pretty common, taken a bazillion deer, packs some oomph. Just checked, and with Hornady Leverevolution ammo, the .30-30 is capable of longer range work than I thought it was. Out to 200 yards easily without much in the way of bullet drop. A .357 lever gun is going to be hard to find for under $400, but if you do find one, you can share ammo with a revolver.
With AKs out of the price range, that leaves us with spendy SKSs and the WWII kit rebuilt SMGs. Even at $300, the SKS is a pretty good buy. I like the Norincos, personally.
If you could get a reliable Suomi or Sterling, you'd have a pretty sweet package, and my choice of the bunch for combat purposes. 9mm, so you could share ammo with your Glock, too. Both are heavy, limited production and reportedly spotty in quality/reliability. Sad.
The Kel-Tec Sub 2000 carbines are pretty much "the answer" if concealment is a priority. Neat design folds in half and allows the rifle to stuff inside an average backpack. Not only shares ammo with your Glock, but magazines, too! Light and generally reliable from reports. Cheesy materials, though. It looks like they're hard to come by these days though, and running over $400 on the secondary market - CDNN has them listed at $350, but I'm not sure if that's in stock or not.
Just as you wouldn't expect one tool to do the job of an entire toolbox, different firearms serve difference roles. Keep your future plans in mind as you start building your collection/arsenal/toolbox of boomsticks. What other guns are you planning on getting? If you have zero interest in getting a revolver down the line, then a .357 lever gun probably doesn't make a ton of sense. If you're planning on an AR-15 later on, a shotgun or a .22 make more sense than say an SKS.
Also keep in mind the role that you need the firearm to fill. Are you learning to shoot with it? A .22 is probably the best choice. Want it for home defense? A shotgun or pistol caliber carbine are probably your best bets. Deer hunting? A shotgun, lever gun or bolt gun could work. You get the picture.
Edited to Add: If you're new to shooting, get a .22 rifle. They're not expensive, ammo is the cheapest you can get, they're a great platform for learning on, and it will stay useful even as your collection grows. While you can certainly learn on other guns, you're probably going to enjoy your initial shooting experiences more with something manageable like a .22, and you can get plenty of trigger time for not so much money. The 10/22 is pretty much the best of the bunch.
If you've already got a firearm or two, look at where the gaps in your capabilities are. What will Firearm X get you that you currently lack?
Anyways, there's some rambling from me for ya. Now discuss amongst yourselves!