The pipe coming out of the wall is commonly called the "goose neck." It is cheap to replace. Just unscrew it and get a replacement. Apply at least three turns of teflon tape to the wall end of the goose neck and screw it back into the wall. Use a cloth to cushion your pliers so they do not scratch the new goose neck.
Slip the metal escutcheon on the pipe (see picture) until it contacts the wall. Apply at least three turns of teflon tape to the remaining threaded end of the goose neck. Screw the shower head onto the pipe.
Turn on water and test for leaks. You LIKE??