Estimating the Shape of the Bend
Either estimate the shape of the angle you want to bend the pipe into or take actual measurements using a tape measure, marking the areas you plan to adjust.
Distribution of Heat
Fill the ABS pipe with sand and put a piece of material (i.e. a sock) in the end. This is to ensure that the pipe does not collapse with the heat. It also ensures there is an even distribution of heat throughout the pipe and no air pockets that will damage the pipe and how it is shaped.
Applying the Heat and Bending
Heat the ABS pipe evenly with a hair dryer or a flameless torch at the point /angle you want the bend while simultaneously bending it to that point. Note that applying too much heat (usually more than 175 degrees Fahrenheit) will wilt the plastic and cause it to melt, rendering it useless. Repeat the heating and bending process until you have the desired angle.
Using the Pipe
Once the desires shape is achieved, wait for the pipe to cool and remove the material that was keeping the sand inside. Finally, tip out the sand, making sure there is none left inside the pipe and then clean the insides. It is then ready to install.