Methods and systems for operating an engine that includes two fuel pumps are described. In one example, a first fuel pump may be activated or remain activated in response to an engine shutdown request so that a second fuel pump may be cooled before the first fuel pump is deactivated in response to the engine shutdown request.