WARNING: This page is about a different car, the 2014 Subaru Forester. However, it is still accessible from the selected car via links, so may be relevant.
Fig 1: AT Shift Lock Control System - Wiring Diagram (Model Without Push Button Ignition Switch)