This is designed to be mounted on a 20x20 or 20x40 mm aluminum extrusion using an M5x10 button head screw and a t-nut.
To enable the sensor, un-comment the lines in the Configuration.h and Configuration_adv.h tabs that I have highlighted in the included jpgs. Also, make sure that FIL_RUNOUT_INVERTING is set to "true".
By default, Marlin uses servo pin 3. On the MKS SBase V1.4, this translates to the pins I have circled in red in the attached picture. Ground is the pin closest to the edge of the board. The middle pin is 5V. The inner pin is the signal.