Just to make sure, since you said two opposite things. You want the pipe to start at the left, move across the screen, and then teleport from the right back to the left. Correct?
You just need to set the body's
position property. For example:
if position.x > screen_size.x:
position.x = 0
If it was the opposition you wanted, reverse the above.