Why do we persist in using the euphemism of the zombie?
We're talking about bad people here who will use such a situation as justification and opportunity to do us and our loved ones harm. Why not just call them that?
I am inclined to agree that a rifle is a better choice.
A semi-auto rifle is deadly from the muzzle to 300 yards, some farther than that.
A shotgun is deadly from the muzzle to 100 yards. I know this from my experience with them with rifled slugs. Some claim that they will shoot farther than that with rifled barrels and sabot slugs, but if you're doing that, why not just use a rifle in the first place?
Point being though, you can choose to engage or respond to a threat with a rifle farther away than you can with a shotgun. And you can shoot farther at a game animal with a rifle. You might miss, you might not (depending on skill), but you still can drop a deer at 200 yards with a half decent rifle. Closer is better when hunting, but if you're near starvation, you best take the shot you have - and the rifle gives you more.
It's true that you can shoot small game with a shotgun and that a direct hit from a centerfire rifle would probably destroy too much meat. Some would say headshoot the little beasts. I'm not sure I could do that if I was weak from hunger and malnutrition. I will grant that an ounce of shot hurtling at a squirrel gives you a better chance to get him than a single projectile, but I wonder if learning to use snares and traps (something I'm not at all well versed in) wouldn't be more productive than either with less work and less use of resources.
Ammo for a shotgun is heavy. Nine pellets of 00 Buck is a proven stopper, but it comes at a price. How many 12 gauge shells can you carry per pound? Even the .308, which is bloody heavy in terms of ammo, gets you about 19 rounds per pound - I'd bet the 12 gauge gets less than ten if you're using one ounce loads of buckshot or slugs.
Still, forced to choose a shotgun for long term survival, I think I'd want a single shot 28 or 20 gauge with a bunch of brass shotshells and all the reloading components I could find, a round ball mould that fits the bore (I think a .54 is 28 gauge, and 20 gauge is around .62 caliber), and punches to make wads and overshot cards. Primers would be the most important thing to store - black powder could still be made and projectiles/shot could be made from scrap lead. I'd bet that although Zinc is known to make poor bullets, it should still serve for round balls or shot.
For defense in the post-apocalypse, Remington 870 with several .50 caliber cans of whatever slugs my gun likes best, along with a bunch of Federal 00 and No.4 Buck.
But I think the two scenarios are not the one in the same that everyone makes them out to be. And I'd still vastly prefer a rifle with as many magazines and as much ammo as I could afford over any shotgun for defense.