These end-stops already have all the electronics already built in. Just connect the swith to the three pins on the ramps1.4 where the pins are:
Vcc - 5V input from the ramps. It is usually the pin not connected to the microswitches.
Gnd - The pin next to Vcc.
Signal - The leftover pin, nearest to the side of the board.