What's your experience and price range? Lots of good guns out there, both new and used, and I consider anything relatively short and with two or more shots adequate for defense.
A side by side coach gun is hard to beat for simplicity and reliability, but not everyone finds them appealing, and you only get two shots without reloading. Pumps are by and large very reliable and also quite simple, but they can malfunction. Auto's have a firepower advantage over both, but are even more prone to malfunction.
If you can give us a few more parameters, we can narrow it down a bit more.
I have four 12 gauges for defense duty. A Remington 870 18.5" with side folding stock and a 2 shot extension that lives near the front door, packed with 2-3/4" 000 buck, a Remington 11-87 Police that stays in the bedroom closet and is alternated with 3" shells of 00 buck and rifled slugs, a New Haven turned coach that hangs on the bedroom wall (more for looks, but stoked with 2-3/4" 00 buck anyway), and a recently acquired Remington model 11 2-3/4" that I shortened to a scant 37". That one lives in my vehicle with 00 buck in the tube and a box of slugs next to it.
L-R: 870, 11-87 Police, Model 11, New Haven SxS
The 11-87, with it's ST ghost ring sights, was brand new and pretty spendy ($850, IIRC). But the others were relatively cheap. The 870 was a freebie on account of being badly rusted (nothing a little wire wheel time and krylon wont fix) and the mag tube extension was $50, the New Haven was had used for $200, and the Model 11 I snagged for $172 out the door. I did all the barrel and stock mods myself, but a smith will cut and recrown for about $50 if you're not confident in doing it.
And on ammo, even though I have 00 or 000 buck in most of mine, I actually prefer #1 or #4. Still pretty big pellets, and lots more of 'em. But no local stores stock them, and I haven't ordered online in some time. If you live in close quarters to neighbors, the smaller buck pellets also have less chance of going through multiple walls. Slugs, while highly effective, would be a very poor choice in tight neighborhoods or apartments/condos. On the other end of the spectrum, I wouldn't consider anything smaller than BB to be adequate. #4 or #2 would probably do the trick, but if the attacker is a big guy, the smaller pellets may not get deep enough to make anything more than a fleshwound. If you do wind up using the larger bird (Turkey) shot instead of buck, stick to lead pellets and high-brass shells with heavy loads. If the gun you buy has 3" chambers, the 3" mag loads give slightly higher velocity and heavier shot loads.