A shot gun would be more versatile however as mentioned the shells are bulky and you simply can't carry enough to make it through an extended period of time.
A .22 is your best bet for a survival weapon. They are light, accurate and capable of taking down game from small birds to deer, with a good shot. I wouldn't recommend shooting a deer with a .22 but in a survival situation if the shot presented itself you could certainly take down a small doe or fawn with the .22. The ammo is also light and you can pack thousands of rounds with ease if needed.
I know a .22 is pretty much useless against big dangerous gritters but the odds of being attacked by one (even in big bear territory) is very slim. I'd rather have a gun that serves better for my survival than protection.