Clean the threads on the backflow preventer with a wire brush. Apply plumber's tape to the threads on either side of the backflow preventer.
Screw a compression fitting over the end of the backflow preventer. Tighten it with a wrench or pliers, but do not over-tighten, because you may crack the pipe. Repeat the process for the other end.
Use a pipe cutter to square off the end of the pipe where you are attaching the backflow preventer. Use sandpaper to gently sand down any rough edges or material clinging to the pipe.
Align the backflow preventer so the arrow stamped on the body is pointing in the direction of the flow of water.
Apply primer to the outside of the connection pipe and the inside of the compression coupling. Allow the primer to dry according to the manufacturer's instructions.
Apply PVC glue to the outside of the pipe and the inside of the compression fitting.
Slip the open end of the compression fitting over the pipe opening. Hold the two pieces together until the glue bonds as specified by the manufacturer.
Repeat the cleaning, connection and gluing process for the opposite side of the backflow preventer.