Like Gary said, the first rule is never, ever, connect the generator and shore power cord together. You can use one and only one source of AC power at a time.
One set of wires comes from the generator, another is the shore power cord and the third set of wires goes into the RV to connect to the circuit breaker panel.
If all these wires connect to individual terminals on a terminal strip, you have an automatic transfer switch that automatically switches between generator and shore power. We'll need to see some pictures in order to advise you how to re-connect them, as the layout varies from one type of switch to another.
Or, instead of the automatic switch, you could have an outlet that matches the shore power cord's plug inside the cord's storage compartment. In this case the outlet is connected to the generator wires and the shore power cord connects directly to the wires going to the RV's circuit breaker panel.
You plug the shore power cord into shore power when it's available and into the generator outlet when you store the cord so the generator can power the RV.