Shields
A starship takes critical damage from an attack only if that attack deals damage to the ship’s Hull Points, even if the result of the gunnery check is a natural 20. If the attack’s damage only reduces a starship’s Shield Points, no critical damage occurs.
Source
Core Rulebook pg. 321