Ok let's talk basics. Shotguns come in different sizes called gauges. This only has to do with the diameter of the shell not the length. If you are wanting a 12 gauge shotgun then you have 3 major choices of shell lengths 2 3/4" 3" and 3 1/2". Most new pump 12 ga shotguns have a 3" chamber which means they can shoot both 3" and 2 3/4" shells. Conversely if you have a shotgun with a 2 3/4" chamber it will NOT shoot 3" shells.
Your best choices for a home defense shotgun for under $500 are in no particular order: Remington 870, Mossberg 500, Maverick 88, IAC Hawk/H&R Pardner, Winchester SXP and Stevens 350. You will want a shotgun with a 18.5-20" barrel and a minimum capacity of 5 rounds.
In terms of ammo you will want buckshot for defensive purposes. I would recommend #1 buckshot but 00 buckshot is fine for defensive use as well.