One of my 2005
JCW keys was not working when I collected my car. The key was sealed shut so no option for replacing the internal, rechargeable battery.
A replacement key is very expensive, which seemed like the only option!
Reading up about how the keys charge when in the ignition I found out that there is an inductive charging circuit (a pair of coils, one in the key and one in near the ignition switch).
The problem being that I couldn't keep the key in the ignition long enough to charge the key up fully!
So thinking laterally I realised that my electric toothbrush uses an inductive charging base so I simply laid my key on the base for 24 hours and it charged up the key's internal battery.
The next stage is to program BOTH keys to the cars central locking system, you must do both keys or one will be out of coding sequence and will appear not to work. Details of key programming are the handbook.
If you can't find the instructions I can type them up in this thread for you...
Good luck, it might work you too...