Access the shower p-trap by removing the ceiling panels underneath the shower on the first floor, below the bathroom. Or, if you have drywall ceilings, cut through the ceiling's drywall with a drywall saw and remove the drywall beneath the shower with a crowbar.
Place the inlet end of the shower trap (the long straight section) into the shower drain, and hold the other end up to the home's drain line. Mark the drain line where the p-trap intersects with it. Cut the drain at this mark with a piping saw. It should end up being about a foot short of the shower drain hole. This allows enough room to install any p-trap.
Attach an elbow joint to the end of the drain line where you just cut it and position the joint so the open part is facing down. Do not glue the fitting in place just yet.
Connect the outlet end (the shorter side) of the p-trap to the elbow joint. Push the inlet part of the p-trap up and through the shower drain. You should have about three inches of extra pipe above the shower drain.
Remove the elbow joint from the drain pipe and p-trap once the p-trap is properly fitted. Cover the edges with PVC glue and re-install the elbow. Coat the end of the p-trap and other end of the elbow joint in PVC glue. Connect the two and let them dry for eight hours.
Push the inlet end of the p-trap up into the shower drain hole. Place a compression gasket over the p-trap pipe above the shower drain from inside the shower. Pound the pipe and gasket back into the drain with a mallet to make a seal between the drain and p-trap.
Replace the ceiling panels. Or, measure the ceiling hole with a tape measure and cut a new drywall panel to this measurement to cover up the hole in the ceiling under the p-trap. Mount the new panel to the ceiling joists with drywall screws. Tape the seams with fiberglass tape and apply joint compound with a scraper. Let the compound dry, prime the panel with drywall primer and a roller, and paint it with interior paint and a roller.