A great gun for home defense is the shotgun. Shotguns are inexpensive, easy to maintain, durable and ammunition is available everywhere. Shotguns have been used for decades and when my grandmother was a child, a shotgun sat by the back door of the farm house to deal with either the 2 or 4 legged predator(I still have that shotgun). In the old days most of the shotguns used for defense were also the guns used for hunting. Many were single shot or double barrel guns. Shotguns have come a long way and today, many companies offer shotguns specifically designed for defense.
A good home defense shotgun doesn’t have to be fancy. There is no need to go out and buy the same shotgun SWAT teams use. A simple pump action shotgun with an 18 inch barrel and a gold bead sight will work well. Typically, shotguns with longer barrels are harder to use in confined spaces. If you already have a shotgun for hunting, talk to your local gun shop about getting a shorter barrel for it. Note that under the National Firearms Act it is illegal for a private citizen to possess a sawed-off modern smokeless powder shotgun, i.e. with a barrel length less than 18 inches (46 cm) and an overall length less than 26 inches (66 cm), without a tax-stamped permit from the ATF, which requires a background check and a $200 fee for every transfer.
Remington, Mossberg, Stoeger, Benelli and others make good shotguns for home defense. Some may be more expensive than others and it really depends on your budget. You may want to consider an extended magazine for a higher ammo capacity. Many home defense guns already come with this option or it is an easy add on. Many home defense shotguns are 12 gauge and I would recommend that gauge for home defense. If you are really sensitive to recoil a 20 gauge may be a decent substitute and is plenty deadly.
Ammunition can range from slugs to buck shot to bird shot. Slugs are great for long range targets (out to 100 yards) and I would recommend them in rural areas. Buck shot is a great man stopper and is great for the kind of ranges you would shoot indoors. Something to always consider when shooting in self defense is what is beyond your target. Buck shot will travel through walls and I would not recommend this type of ammo or slugs for apartments or in places where the chances of a safe shot are very limited. Bird shot may be the best choice for people in this type of situation. There are a lot of people who will say bird shot is not suitable for defense but I think this is nonsense. Bird shot can be incredibly damaging to soft tissue at close range. Anyone who takes a hit of bird shot will regret they picked your house to break into.
Lastly, it is of the utmost importance that you practice shooting your shotgun. Many gun ranges will have a place where you can shoot slugs or shot at cardboard targets. This will give you a great idea of how your gun performs and at what range you will get an accurate shot. Get familiar with your gun. You may even want to take a class in defensive shotgunning.