Replacing a coffee maker switch with a relay - grounding issue
You only have two wires coming in, so you don't have a ground connection. Most likely, the switch is a double pole, so that both sides are isolated when off. That way, if the appliance has a non-polarized plug, the element is isolated regardless of how it is plugged into a socket.
  If you have a double pole relay, you can wire one pole into each of the red and white wires - you're better off leaving the switch in circuit so you can still switch it off (and it plugs the hole in the casing), or you can just put a single pole relay anywhere in the wiring downstream of the switch. 

The two devices you see inside the arc of the element are I think one-shot thermal fuses, which will disable the appliance if the thermostat (white body) malfunctions.