Quite a few information gaps here, so I'm with halfbaked on this one. If she's not familiar with firearms, there's far too much that can go wrong before she reaches the moment of truth. Any hesitation, apprehension, or fumbling up to that point is just asking for a potential intruder to wrest said firearm away from her, and now you have an armed intruder.
A dog is often the most effective deterrent to strangers. In an apartment where dogs may not be welcome - pepper spray, mace, or a taser would probably be better choices than a firearm.