When the shower wall is installed, it should be water resistant or even waterproof. The studs would rot if it wasn't.
Like Bryan, I would be concerned with the foam injection into the box - did you do that to keep water out? What about heat dissipation?