A. Arlington Industries (800/233-4717) and Lamson Home Products (800/321-1970) both make an adjustable plastic box extender for just this purpose. Alternatively, a utility (or handy) box extension would provide almost 2 inches of added depth for a single-gang box. For two-gang extensions, an extension ring for a 4-inch square box at 1 1/2 inches deep is also available (Figure 3).
Boxes are allowed to be set back only 1/4 inch if the wall surface is a noncombustible material, such as drywall or tile, but must be flush with the finished wall surface if it is combustible, like wood paneling.
to read the full article.