How do you install electric outlets on both sides of a 2"x4" interior wall to meet code? The back of each box (and wires entering box) is very close (less than 1/2") to the front of the other side of the wall. Is there code on how to do this?
I'd use 4x4 boxes that are 1-1/2" deep with single gang raised mud rings. These will give you plenty of room inside.
Feeding through the backs of the boxes with a nipple sounds easy but will turn out to be a pain. Better to just feed bottom to bottom with a short romex jumper.