As long as it's attacking a Rebel Space unit, Devastator gets +2 power.
Keywords
Shields
Shields X: A cumulative, static ability that means, "The attacking unit gets –X power against this unit." Shields only matters when attack dice are rolled. If you give a unit Shields after your opponent has rolled for damage, it doesn't affect the roll.