Problem with relay shield or some mistake with code?

Many relay shields are "Active Low" such that a LOW signal activates the relay. That way a light pull-up resistor can be used to de-activate the relay when the processor resets and turn all pins to inputs.