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