I believe you would be back feeding into your shore power cord. You need a transfer switch. Your shore power cord will go onto one set of terminals, your gen cord will go on a set of terminals, then you go from the set of terminals on the transfer switch to where the shore power cord was in the panel. Mine lets the generator run for 30 seconds before closing and putting power to the panel.
I would add that when you unplug the gen and the bare terminals of that cord are out in the open there is no way that shore power will back feed to them.