You can either solder in the male adapter to the body,
or solder a male adapter onto pipe first, dope and thread in.
I just found the shower rough in I have is thread type. I would like to be solder type.
I am a little worry about the leaking from the threaded joint after everything is there. One way to relieve this is use it with union.
Do you think it is good idea to add an union there?
Using a union just gives you three more places it could leak.
Licensed residential and commercial plumber
Plumbers have been installing threaded and sweat for years - done correctly they both have the same durability. You don't need unions.
Just remember to remove the cartridge if you sweat.
One way to do this is to solder a piece of pipe to a 1'2" male adapter. Then screw the adapter into the valve body. Then solder the rest of the fittings and pipe. This avoids getting the valve body too hot. This adapter is not really a "special" adapter, accepts a 1/2" pipe into one end and has 1/2" thread on the other. Very common, just ask for a 1/2" male adapter.