How to tap in to an external board

I want to control a ceiling fan speed and lights for an arduino IOT project. The way I plan to do this, is through the remote control it came with. I already took apart the casing and got the circuit out, and found numerous buttons. They do still work without the casing, if that helps. I know how to solder. I want to desolder the buttons and solder wires from the arduino. But if i use digitalWrite(12, HIGH);, put a wire into pin 12, and touch the button on any of the pins, it still doesnt control the fan or light up the status light.

I have a picture of the board here
I am also using the Mega 2560.

Did you also connect a wire from the Arduino common to the board common?
The board operates on 9V, Arduino 3.3 or 5V.

Maybe use a relay board in place of the switches and drive the relays with the Arduino.