There are two types of shiftlocks: mechanical and automatic.
Mechanical shiftlock
The gear selector can be moved back and forth between N and D. The other positions have a shiftlock that is operated using the lock button on the gear selector.
Press and hold the shiftlock button and move the gear selector forward or backward between P, R, N and D.
Automatic shiftlock
The automatic shiftlock has a separate safety system.
From Park - P
To move the gear selector from the P position, the brake pedal must be depressed and the ignition in mode II.
From Neutral - N
If the gear selector is in N and the vehicle has been stationary for at least 3 seconds (with or without the engine running), the gear selector will be locked in that position.
To move the gear selector from N to another gear, the brake pedal must be depressed and the ignition in mode II.