Hard Wire With No Doorbell

I have a client with one of these doorbells. When they originally installed it, they had a doorbell on the wall. That doorbell ended up cooking itself, so they removed it. The wires were just tucked into the wall. Now they have to remove the battery from the doorbell to charge it.

If I were to connect the red wires together (the white ones are already connected to each other), would this provide the voltage for charging?? I am presuming that it would work - I would just need to disconnect one of the wires from the back doorbell button to avoid any issues.

If this will work, please let me know. Thanks in advance.