It is important also to consider the type of zombies you will be fighting.
If they are infected with the Rage Virus, as described in the documentary 28 Days, then remember that you will need to avoid exposure to Zombie blood, or else you too will become infected. In this situation, I think a shotgun will be a poor choice. It is simply too messy.
Also, you must take into consideration whether you are dealing with slow zombies or fast zombies. A hard recoiling, slow reloading weapon like a 12 gauge shotgun would again be a poor choice, as it will make rapid follow up shots, and rapid reloading more difficult.
As noted in the excellent reference The Zombie Survival Guide, the venerable M1 Carbine is considered by most experts to be the weapon of choice when dealing with Zombies. It has enough power to punch through Zombie skulls, reloads quickly, has little recoil, and doesn't cause the mess and potential hazard of splattering Zombie blood everywhere. Additionally, it is light and handy, so it can be maneuvered easily in the places you will most likely be during a zombie attack, such as a subway, mall, or amusement park. Personally, I prefer an AR over the M1 Carbine, mainly because I feel that scrounging for ammo will be easier to do for an AR. There will be plenty of abandoned 5.56 ammo left behind by decimated military and police forces. I feel that ammo and spare parts will therefore be much easier to acquire for an AR.
Remember though that ultimately your hardware will not get you out of a Zombie attack. Its really all about mindset. Stay alert. Remember the government routinely covers up Zombie attacks and labels them as other types of disasters. You have to take the initiative and remain prepared. You won't know the Zombies are coming until it is too late.