Keyless Control Module Removal/Installation
1. If the keyless control module is replaced, always perform the following procedure.
Vehicles with immobilizer system
Keyless Control Module Configuration.
Immobilizer System-related Parts Programming [No.4 Programming Procedure Due to Keyless Control Module Replacement].
Vehicles without immobilizer system
Keyless Control Module Configuration.
Advanced Key Id Code Registration.
Steering Lock Unit Id Code Registration.
2. Disconnect the negative battery cable..
3. Remove the following parts:
a. Passenger-side front scuff plate.
b. Passenger-side front side trim.
c. Grove compartment.
d. Passenger-side lower panel.
4. Remove in the nuts.

5. Disconnect the connector.

6. Remove the keyless control module.
7. Install in the reverse order of removal.
Test yourself
A quick Mazda 3 quiz: every answer comes with an explanation and a link to the manual page.