How to extend 1/2" shower connection just a little bit
There's a one-peice extension fitting that's a bit shorter. Might or might not be shorter enough; or too short. You'll probably have to order it or try a comprehensive plumbing supply.
Search on 1/2&quot; pipe thread extension and you should get results. Male threads on one end, female threads on the other, one solid piece.
The other likely options would be select a different product more adjustable to retrofit installs, or fill the space between the wall and the fitting on a &quot;too long&quot; extension with some sort of accent tile of appropriate thickness.