There are sooooo many choices of weapons out there that it seems kinda vulgar to tell you what I think is the best choice so I will start this post by stating that this is my opinion and others may be better suited with what they are more familiar with.
Speaking of familiarity, it would be ideal to purchase a gun ahead of time or to at least have some experience shooting, dismantling and cleaning guns so that you don't kill yourself trying to figure it out on your own. .22 rifles. Need I say more. Yes there are more powerful and enjoyable guns to shoot but in my experience a .22 will be my first line of defence. I once owned a Marlin Glenfield 70s model .22 rifle. One of the few times I fired it I decided to get target rounds for it. These are not the bulk packaged usually hollow tipped rounds that will be the most common. Firing these rounds amazed me.When fired, all you could hear was the bolt mechanism cycling. That was it, seriously. Moving on, I later purchased a ruger 10/22. I trust that gun with my life, and you can buy 30 round magazines for it. Ammo is cheap and small but still effective to the eye sockets and even just headshots at certain ranges.
Having multiple magazines is a must. But remember that this is not a video game and they don't reload themselves. Also keeping a mag fully loaded all the time and not releasing the tension of the spring will eventually cause it to break down.
Secondly I recommend carrying a pistol. 9mm is probaly the most common round so therefore the easiest to come across (in pistol rounds that is). I prefer to carry a .40 cal tho. Of course with all pistols there are some drawbacks. Pistols are loud and not as accurate as a rifle (unless you are James Bond) so this would be more of an "oh SH*T there's one behind me" kind of gun.
Of course I can't forget shotguns. I would suspect the best use for a shotgun would be for home defence as they tend to not be very accurate at long distances and firing only slugs and buckshot will destroy your shoulder, if the weight of the gun dosen't first. I would prefer a semi auto .410 but stocking up on ammo for these is not very cheap so I would go with a 12 or 20 gauge. I do not have experience shooting zombies in the head with a 7 1/2 shot but I would assume it would not take it out as easily as a buckshot or slug, but these may even be overkill and more expensive to stock up on. Something between a 2 and 5 would probably work just fine at up to twenty feet or so, plenty of distance if you are inside a house.High powered rifles sure are fun to shoot and zero in your aiming ability, but for a quick getaway they are not a good idea.
My recommendation (aside from a .22) would be some sort of assult rifle. AR15, AK47, SKS, M16. Something along those lines. I listed the AR first because I have seen some that I would love to own, and the .223 round seems pretty practical and reasonably common. Plus they have pretty good distance and more accuracy than a .22. Also you can get pretty good capacity mags for these.