If an alarm goes off on Shabbat because one touched one’s car or entered one’s house carelessly, what should be done? If the alarm goes off during the day and will stop relatively soon, one may not take any action to turn it off. However, what if it will continue to make noise for an extended period during the day or for even a short period at night? If the alarm disturbs people and causes them anguish because it prevents them from sleeping, sets them on edge, and ruins their enjoyment of Shabbat, one may turn it off, as long as one does so via a shvut di-shvut (above 9:11). This is because turning off the alarm is only prohibited rabbinically (see section 1 above), so if one turns it off with a shinui such as by pressing the appropriate button on the remote control with a spoon or the back of his finger, then the action taken is considered a shvut di-shvut. Even if turning off the alarm will make a light go on temporarily, since he does not need this light, it is considered a psik reisha de-lo niĥa lei (above 9:5).
It is true that some forbid this, only allowing one to be lenient if a non-Jew is available to turn off the alarm. For one who follows this position, if his non-observant Jewish neighbors threaten to call the police (which will lead to additional Shabbat desecration), he should tell the neighbors where the remote control is. Then the neighbors can choose to turn the alarm off themselves rather than call the police (Melakhim Omnayikh 10:6).
However, in practice, since this is a case of great necessity for the sake of a mitzva, one may turn off the alarm via a shvut di-shvut (see Be-ohalah shel Torah, OĤ §23; R. Dov Lior in R. Moshe Harari’s Kedushat Ha-Shabbat vol. 1, p. 303).