It is possible for a pitcher to record a shutout without starting the game or pitching a complete game, so long as all the outs in the game are recorded under the same pitcher with no opposing runs scored by the other team.
Conversely, if a game goes into scoreless extra innings, the same pitcher must pitch until the end of the game, despite having already pitched a full nine innings without allowing a run.