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