i try to leave the back box about 5mm inside the finished wall, the most important thing is not to have any sticking beyond the plaster as this looks seriously ugly and can effect the flushness of the finished socket.
If it's a plasterboard wall use a fast fix box and be sure to cut the sides back to one sheet of plaster so you can fix back the wings, also if the wall is shared with a neighbour then be sure to install a fire-proof box around the socket, if you can't do this get the chippy or dry liner to do it because it has to be done; it's a legal requirement and if they're is a fire you may be the one who gets in the poo.