One more thing, how does shore power get grounded if the grounds are move to the boat dc bar??
Say a hair dryer on your boat shorts out. What has happened is that a positive or neutral wire has made contact with the metal casing of the dryer. If there was no green ground wire, your body would become the path of least resistance for the current. However, if a ground wire is attached to the casing, then the ground wire would carry that current instead and no electricity would pass through your body.
Where does that green ground wire go? Well, from your AC outlet on your boat it should go to a bus where all the other AC green ground wires from all the other AC outlets and equipment go. This is not the same "ground" as the black DC negative current from your batteries nor is it the AC white neutral bus! This green ground bus must also have a green wire going to your shore power socket on the side of your boat. When you plug your yellow shore power cord into the socket, you are now connecting the ground bus on your boat to the ground prong on your dock. In essence, the case of your hair dryer now has a direct electrical path back to the shore should a short occur.
Now, the "green" AC ground bus on your boat should also, in fact, go to to the engine block. Any device like a battery charger or inverter poses the danger that an AC circuit could short into a DC circuit. Since the DC circuit is already grounded to the engine block and hence the water, any AC short into your DC wiring could electrocute anyone in the water. But with the engine connected via a wire to the ground bus and hence the shore power ground, any short will be conducted more readily by the shore power ground wire rather than the water.
Therefore, to answer your question, the shore power is NOT grounded to the DC bus bar. But they do both ground to the engine block. One thing to keep in mind: DC circuits use two wires: a positive (red) and negative (black). AC circuits use three wires: a hot (black), neutral (white), and ground (green). The two circuits should never be combined.