Handgun or shotgun? It will depend on your living circumstances and how much time you're willing to devote to practice shooting.
Handguns have the advantage of their smaller size and the ability to use with a single hand. The handgun may be more comfortable for some people to deal with and it is certainly easier to secure when away from home or if you have children in the home. There are disadvantages to the handgun, including their lower power factor, the single projectile can miss the target and you must practice more with a handgun to become proficient.
Shotguns have the advantage of effective stopping power (with buckshot) and multiple projectiles. Their disadvantages are they are more difficult to maneuver inside a home, they can be more easily grabbed in a close encounter and they are difficult to use with one hand. You still need to practice, though not as much as with a handgun for simple defense.
Which one to choose?
What's the layout of your home? Single or two-story? Do you have kids or other family members (or roomies) living in other areas of the house? If an intruder is inside, will you hold up in your bedroom aiming at the door? Or will you, of necessity, need to go down the hall to get kids/family members to safety?
If you can hold up in your bedroom, the shotgun is the better choice. Likewise if you have a two-story home where you can defend the top of the stairs while the spouse gets the family into the bedroom. Then you retreat to the bedroom and cover the door.
A handgun may be much better if you need to move others by yourself. Handguns are easier to hide and secure in a lock-box than a shotgun so keep this in mind if you have kids. If your wife will use the gun too, be sure to obtain something she feels comfortable with using.
For a husband & wife it seems that a 20 gauge pump or semi-auto shotgun works pretty well. Remove the magazine plug so you can have more than 2 or 3 shots and stoke it with buckshot. Do practice with it from both a shoulder fired position and from a hip position before relying on it.