Several ways to do this. The adaptors and cords already mentioned will work for sure. The way I list below does require a little work...
Since I already had Camco 55562 dogbone
https://www.amazon.com/dp/B005SB6TLA...v_ov_lig_dp_it
all I did was cut the end off the "factory" cord and put on the Camco 55353 receptacle
https://www.amazon.com/dp/B00192QB9M...v_ov_lig_dp_it basically making it a long extension cord.
I already had the existing dogbone I listed above to hook to shore power at my shop along with a 10ft 50amp extension cord. So when I go somewhere and want to hook up to 50amp service I have the dogbone and two different length extension cords I can use separate or together depending on the distance I need.
I did not have to spend $$$'s for another dogbone this way and the threads on my "factory" cord had become pretty bad so I was not opposed to cutting the end off that plugs into my camper.
Goes to show there is no right or wrong way to do what you want to do. I have found the Camco Dogbones to be very durable and reliable.