A/T Shift Lock Solenoid and "P" Position Switch: Installation
WARNING: This page is about a different car, the 2003 Subaru Impreza. However, it is still accessible from the selected car via links, so may be relevant.
Install in the reverse order of removal.