Oh, just realized I hadn’t answered the OP. First move is to make sure the loved ones are with me, and we are in a ‘safe’, defensible area. Second, and probably at the same time, is to call 911 and make sure the cavalry is on the way. Worst comes to worst, they can arrive to perform medical care on us. If that solves the problem, I’m delighted. I’m certainly not going to try room clearing by myself. And though Texas does allow the use of deadly force to defend property, I probably won’t do so.
The dog or other alarm system may scare off the burglar/invader all by itself. Great! It will hopefully allow for enough warning for me to assess the situation and get the phone, light and weapon(s) together. An audible alarm might also attract attention, further inducing the criminals to leave, which is what I want.
But the OP wants to know what we’ll use, should we have to use violence to stop the threat, and the answer is to use what’s available. I prefer firearms—any firearm—to anything like hand to hand or edged weaponry. Had I a short barreled AR, I’d use it. The potential lack of over-penetration for properly selected .223 ammo is a major plus. (As well as being really counterintuitive) The edge in range over a handgun or shotgun is another plus. Not that it will be likely to come up—hell, all of this is astoundingly unlikely to happen to you or me—but if it should, and I need to stop a faraway threat, I’d rather have the rifle. I’m not going to likely have one though, given they’re starting at 1200 dollars and going up, these days.
Shotgun with buckshot would be my second choice. Either weapon needs something to aid the operator in low light situations, be it a light, laser sight, tritium sights, or all of the above. Because it’s going to be a lot more difficult to get a sight picture under stress, in the dark, than when you’re at the range. I can do the “balance the flashlight against the side of the pistol” thing with the back of my flashlight hand at the range, but probably not under stress.
All firearms need to be aimed. All need to be used with full awareness of what’s behind the target. Because anything that will penetrate a bad guy enough to make him stop being a lethal threat to you, will also penetrate enough to go zipping through several walls and doors, and whatever lies behind them.
Finally, practice with whatever you choose. A firearm isn’t a magic talisman that, solely by its existence, keeps the dangers at bay. You actually have to know how to use it and be familiar with how to do so. Then for God’s sake, study up on your jurisdiction’s rules on when you, Jane Citizen, can use deadly force. A good firearms instructor, like enipla or ducati was mentioning in another thread, should be able to help you answer these questions. Have a good lawyer on speed dial, along with whatever it’s going to cost (and it will cost a lot) to keep them on retainer. My guess is that your lost T.V. will cost a lot less then the lawyers will; firearms are to prevent the loss of much more valuable things, IMHO.