Yep, 12-gauge slugs. And doesn't need to be a fancy Super Ultra X-Treme Turbo ZX type either, just the plain ol' Foster-type slug.
No sense spending a lot of money on a fancy projectile that groups well at 100 yards, for such short range use.
My family's had a log cabin on a lake, in grizzly and black bear country, since 1972 in the central portion of British Columbia, Canada.
I've never had a problem with bears, but others have.
The locals all swear by 12-gauge pumps. The short-barreled variety with a pistol grip is enormously popular. Put a sling on it and you're good to go while fishing or berry picking.
Some load it with a 3" 00 buckshot load as the first shot, figuring you're going to be startled and may need a little wider pattern. I dunno, seems like they're fooling themselves.
If you pattern any shotgun at 20 feet you'll get a pattern -- at most -- about the size of your hand. At 20 feet, not much room for shot to spread out. Forget what you see in the movies; even short-barreled shotguns don't throw wide patterns at across-the-room distances.
Anyway, my Canuck friends prefer a 12-gauge pump loaded with regular slugs. I've met a couple with older 16-gauge pumps that they swore by. But most view 20 gauge as marginal -- though when you compare the bullet weight and velocity it matches the regular .45-70 load.
I guess a 20-gauge would do the job, with some of those fancy slugs that penetrate deeper than the Foster design.
Still, when I visit my cabin, I bring my Browning A-5 semi-auto 12 gauge, with 20-inch barrel. It's loaded with slugs. Utterly reliable. I figure 5 slugs as fast as I can pull the trigger is mighty fearsome.
Years ago, as a joke, I taped a dime to the plastic stock with a piece of masking tape. Sure enough, someone just had to know why, considering the nearest payphone is 30 miles away and costs more than a dime.
"That's so I can take out the buttplate screws," I told them.
"Oh? Got more ammo under there?"
"No. Fresh underwear," I replied. "Cuz if I ever have to use this thing against a bear, I'm gonna need it!"