Most of those valves will allow either a threaded connection, or you can slide the pipe into the opening and solder it there. If you remove the cartridge and clean and flux the pieces, a soldered connection is probably better. Either one can work if done right, though. Don't solder a threaded connection since, if you ever do want to disassemble it, it will be a major pain.