He should not have done that. In general a Jew is not permitted to ask a non-Jew to do things that are forbidden to him.
Some exceptions are things necessary for normal life, that would be impossible to do in advance. A classic example is lighting a fire for heating (back when that was done with a pile of wood), and minor medical needs. (Major medical needs the Jew would violate the Shabbath and do himself.)
Getting high is not a necessity, and the fridge switch could have been taped before the Shabbath.
My former (I moved) Orthodox neighbors had some lovely coded language for this sort of thing. "Our house is really hot, do you want to come over?" "We're cooking, perhaps you have some advice?"
Some exceptions are things necessary for normal life, that would be impossible to do in advance. A classic example is lighting a fire for heating (back when that was done with a pile of wood), and minor medical needs. (Major medical needs the Jew would violate the Shabbath and do himself.)
Getting high is not a necessity, and the fridge switch could have been taped before the Shabbath.