It is mechanically possible to install a standard new-work box in an existing wall by:
Cutting hole in drywall adjacent to a stud
Placing plastic box in the hole up against the stud
Screwing through the plastic into the stud. The screws would need to be somewhat angled and as much as possible positioned to penetrate the meat of the stud.
However, is this acceptable practice? To be clear, I'm asking about using a box that was not specifically designed to be mounted in this way.
Once concern I have is just that the screw heads could be slightly in the way, maybe a small risk of nicking wire insulation. But this is probably avoidable and there are plenty of other similar circumstances where that has to be taken into consideration.
Second concern would be if this violates electrical code for some reason? (USA)
Note - there are a few reasons you might prefer to use a new-work box instead of an old-work box (which would not require this procedure):
- You don't have one on hand
- Much more secure to attach to stud than to drywall, like for a large 240V plug