If you want it for your wife, then you need to go to the gun shop and get something that she is comfortable with. It does jack if she a) doesn't like guns b) can't hold c) doesn't know how to use it.
If you want something for home protection, that's good--I would not go with a shotgun. It's too tough to maneuver in the dark around doorways and halls, and the bad guy can see the barrel coming around the corner first and grab it if they are close.
Regardless of the weapon, you and your wife MUST get trained in how to use it, how to shoot comfortably, and what the rules of engagement are. You don't want her in a situation where she blows away the UPS guy; alternatley, you don't want to come and find her hurt and the whole wall peppered with bullets but the bad guy didn't get hit.
I would seriously recommend reading "The Farnam Method of Defensive Handgunning, Second Edition" by John S. Farnam. It will talk about what to consider in home defense. Then get to the range, find an instructor, and get your wife shooting. You both need to get shooting and get some drills down.
Buying a gun is great, but simply having it is like buying a fire extinguisher and calling yourself a fireman.
The XD's are a great pistol--a .45 will actually kick a little less that .40. I would look at a Glock as well for your wife, it might fit her hand smaller. Go to the range, and test fit a bunch of guns. Both of you can find one that should work.
The safe is a must--they make a great one where it's a hand pad and a combination of finger taps opens it. Also have ones with a biometric fingerprint reader.
Don't get hung up on "this gun is better than that gun" or ultra cool ninja-gun shit. You want a tool that makes non-survivable holes in soft tissue. The firefight will be over in less than 10 seconds and use less than 8 rounds at a distance of less than 21 feet, according to statistics. So, most of the "my gun is more badass than your gun" goes out the window. A 22 in my hands vs. a .40 in the hands of the girl who was that range next to me yesterday is a world of different. I put holes tight in the target with a tiny caliber. She put holes in the walls, the ceiling, all around the edges of the paper target and the floor a couple of times. The human silhouette on the target was untouched for most of her clips. So...she had a bigger, cooler gun--but which one of us would you rather be when it's 3am and something went "crash" in your living room?
The key again, to repeat over and over

is get comfortable. It should be a muscle memory at the point of using it.