This article is from the Toyota RAV4 FAQ, by Ralph Becker with numerous contributions by others.
From Thomas A. Yurick <designer@penn.com> by way of
Mark Miller <mark@bccd.com>:
First, some background info. You will need to find the ECU for the
alarm/keyless RS3000 system. Mine is under the drivers seat. Looking
at the side with the connectors on it, there is a small button or hole
on the right-hand side. you will need to press the button or insert a
paper clip into the hole to press the switch inside, following the
instructions below. The Status Monitor is the the Red LED light on the
dash that says "security" under it. This procedure seems quite simple,
although the manual still advises one to contact a dealer to do it. It
sure isn't worth $76! Be sure that you follow the procedure exactly or
there is a chance that you might mess up the programming of the
original remote. If that happens, just follow the procedure again to
add the remote back to the system.
1. Insert key into the ignition switch and turn to "ON".
2. Press and hold the ECU's programming switch for 3 seconds.
The Status Monitor LED turns on for 5 seconds.
YOU MUST PERFORM THE NEXT STEP WITHIN 5 SECONDS!
3. Press and release the remote control's top or bottom button
(whichever one you want to operate the system).
The Status Monitor LED turns off.
The Piezo "chirper" chirps once.
The exterior lights flash once.
4. Turn off the ignition. The ECU will now operate with the remote
just programmed.
 
Continue to: