That's it, they work great. Make sure you have the recommended slope in the ditch so the water will move where you want it to, not just sit in the pipe and stagnate.
At the end of the pipe you can have an outlet at grade or dig a gravel filled sump for the water to go into to drain down into the soil....