I managed to solve the problem
The topic to publish the command to should read:
"shellies/appliance id/relay/0/command"
The commands are: on, off or toggle
e.g.:
mqttClient.publish("shellies/fan/relay/0/command", 0, true, "toggle");
mqttClient.publish("shellies/fan/relay/0/command", 0, true, "on");
mqttClient.publish("shellies/fan/relay/0/command", 0, true, "off");