My partner and I recently remodeled an old home. Once all the new switch and outlet boxes were cut into the lath-and-plaster walls, we noticed some were not as secure as we would have liked. So we slipped the straw-shaped nozzle on a can of expanding insulating foam through the cut next to the boxes and foamed them in place, making sure that the foam stayed on the outside of the device box. They stayed put.
Bob Orlando, Lafayette, CO