וְהֽוֹצֵאתָ֣ אֶת־הָאִ֣ישׁ הַה֡וּא אוֹ֩ אֶת־הָאִשָּׁ֨ה הַהִ֜וא אֲשֶׁ֣ר עָ֠שׂ֠וּ אֶת־הַדָּבָ֨ר הָרָ֤ע הַזֶּה֙ אֶל־שְׁעָרֶ֔יךָ אֶת־הָאִ֕ישׁ א֖וֹ אֶת־הָאִשָּׁ֑ה וּסְקַלְתָּ֥ם בָּאֲבָנִ֖ים וָמֵֽתוּ׃
you shall take the man or the woman who did that wicked thing out to the public place, and you shall stone them, that man or woman, to death.—
Torah Temimah points to Sanhedrin (the discussion of the location of stoning).
אל שעריך. ת״ר, שעריך – זה שער שעבד בו, או אינו אלא שער שנדון בו, נאמר כאן שעריך ונאמר להלן (פ׳ ב׳) באחד שעריך, מה שעריך האמור למעלה שער שעבד בו אף שעריך האמור כאן שער שעבד בו.
English: “To your gates.” Our Rabbis taught: “Your gates” — this means the gate where he worshipped. Or is it rather the gate where he is judged? It is said here “your gates” and it is said above (verse 2) “in one of your gates”; just as “your gates” above means the gate where he worshipped, so “your gates” here means the gate where he worshipped.
A gezerah shavah equates the two occurrences of “she’arekha,” establishing that the execution takes place at the gate of the city where the idolatry was committed, not at the seat of the court that tried the case.
Gezerah shavah (one of the 13 middot of Rabbi Yishmael). The identical phrase “she’arekha” in the two verses is linked to determine the place of execution.
The idolater is taken out and stoned at the gate of the city in which the idolatry was performed.