If it's the vehicle immobiliser that's causing the problem and not an add on alarm system/immobiliser the hand book generally gives the method to reprogramme the key when you have changed the batteries.
For example, in my Scenic handbook, to synchronise the key after changing the battery:- From inside the vehicle:
Press and hold the plip remote control for approx 10 seconds until the tell-tale light on the key extinguishes. Release the plip and then press it twice in succession. It adds, if this procedure is not successful consult your Reanult dealer.
The car is ten years old and I have never had the battery changed. But then I normally use another remote to lock/unlock the doors and operate the alarm which was fitted after purchase.