Find a suitable route for the drainpipe from the shower to the main drain stack. The main drain stack is typically located in the flooring of your home. Route the pipe along the joists for the best results.
Cut through the existing drainpipe with a pipe saw and install a T-fitting at the cut by fitting both sides of the pipe into the T-fitting's opposing fitting holes. Align the other outlet on the T-fitting so it points toward the new shower drain.
Connect 3-inch PVC piping to the fitting and run it all the way to the shower drain with the appropriate couplings and fitting joints for the pipe route. Do not use PVC glue yet. At the shower drain, connect an elbow joint to the pipe and position it so the open end is face-down. Connect the outlet end of the P-trap to this joint and route the other inlet end of the P-trap to the shower drain.
Push the inlet end of the P-trap up through the shower drain. Slide a compression washer over the top of the P-trap from the top of the shower base. Set a block of wood over the pipe and washer and hammer them into the drain to make a seal.
Take apart the shower drain line you just built, now that it is routed and everything fits. Reassemble the drain but this time use PVC glue on each piece of piping, joint and coupling. Let the drain line dry once all of the pieces are fitted in place.