Diodes should be used on the brake and tail lights to allow either signals from the vehicle or the motorhome to light them. A wire is run from the front to the back with a connector at the front bumper. A cable connects between the motorhome and towed that supplies power from the motorhome's lights to the rear of the towed where the diodes act as an automatic switch to provide light from only one source to light the lights preventing any interference between the two sources. Applying the vehicle's brakes light the brake lights and the tail lights work from the dash or automatically just as they always do whether connected to the motorhome or not. When connected the power from the motorhome's brake lights and tail lights goes through the diodes and lights the lights when brakes or tail lights are lit. The diodes allow power to go in only one direction - to the tail/brake lights and not backup into the vehicle's electrical system. You need a diode for each stop/turn signal light and one for the tail lights. They're about $10 to $15 each. Think of them as a check valve for electricity with two inputs and only one output.
ROADMASTER's Hy-Power diodes