In order to make it work (because it’s a bit buggy), you have to return to the main menu after undocking the two docking ports. Once that’s done, you can go back into the game and dock the heatshield to protect the ship and the engines !
You need "no collision damage" !!!
To put it on the moon, I suggest you to teleport on it (use infinite fuel too), with a longitude of 100, and a height of 4000. Then use the engine below the vehicle to rotate it while you are in the air. (No Gravity can be usefull too at first).
To dock it back, use the landing legs to elevate it just a little bit, in order to align it with the docking port.