As mentioned, there is no polarity to these types of capacitors. Either terminal can be connected to either spot on the electronic control.
However, I think you may have other issues. If the dryer doesn't shut off when the door is opened how do you turn it off at all? Do you unplug it? Does the...