Use a FET to control the power supply, the FET will be controlled by the PIC.

When you give the PIC the command to kill the FET jump to a routine to write whatever is needed to the EEPROM, then kill the FET.

This thread has a couple schematics and discussion that should help.
http://www.picbasic.co.uk/forum/showthread.php?t=19293