IMHO the "Assault Rifle" is more versatile. I own a Steyr AUG-Z in .223 for the TEOTWAWKI type of situations. It gives me 42 rounds of .223 out of a 20" barrel in a short gun only 31" long in total. I'd use M193 or Federal LE223T3 ammo. I also prefer the rifle for scenarios when you need a very precise shot to the brainstem or e.g. a dog going mad on a playground etc...:
The shotgun (12ga in my cases) has it's place though. If the goal is to stop whatever comes charging at you, be it a shizoid-paranoic young man on speed with a knife (I had that in my workplace already) or evil intruders, I'd go for the 12ga. A simple and reliable coach gun puts the whole capacity of a submachinegun into a threat with only two trigger pulls.
So, since the .223 is more versatile, it will be my overall choice. If I know or expect the ranges to be within 20m/yds and no necessity for surgical precision, I'd feel very well equipped with a 12ga. That's why a double barreled coach gun loaded with 00 Buck is handy at my desk at work: