I would recommend leaving them on and simply soldering to the leads if possible- they're a bit messy to remove from the board and it's easy to lift the traces afterward. If you need to remove the plastic plunger, you can easily pop the top metal can off that holds it in place.
Otherwise, electrically it's a straightforward swap- one pair of leads to an IO pin on the microcontroller, one pair to ground.