Lectures on the weekly Torah reading by the faculty of Bar-Ilan University in Ramat Gan , Israel . A project of the Faculty of Jewish Studies, Paul and Helene Shulman Basic Jewish Studies Center, and the Office of the Campus Rabbi. Published on the Internet under the sponsorship of Bar-Ilan University 's International Center for Jewish Identity. Prepared for Internet Publication by the Computer Center Staff at Bar-Ilan University . Inquiries and comments to: Dr. Isaac Gottlieb, Department of Bible, email@example.com
Interpretation based on the juxtaposition of texts (semikhut parshiot) in Deuteronomy was accepted by all the rabbis of the Oral Law as a legitimate method for arriving at halakhic rulings.  This approach to the text was developed also for the non-halakhic parts of the Torah and in this context was expanded upon by later exegetes as well.
The juxtaposition of the commandment to wipe out the memory of Amalek and the commandment forbidding one to cheat in weights and measures, which precedes it, was explained in the Midrash (Tanhuma, Ki Tetze, 8) as follows:
If you see a generation whose measures are false, know that the Gentile authorities will be provoked to aggression against that generation. How do we know this? For it says, “False scales are an abomination to the Lord,” and it is immediately followed by the saying, “When arrogance appears, disgrace follows” (Prov. 11:1-2) … Moses hinted at this in the Torah, as it says, “You shall not have in your pouch alternate weights, larger and smaller”… and what does it say after that? “Remember what Amalek did to you.”
The Midrash does not aim to explain how false measures and weights provokes the enemy (“the authorities are provoked to aggression against that generation”), nor to identify the essence of Amalek by this juxtaposition of texts. The aim of the Midrash is to emphasis the magnitude of the failing when one deals falsely in weights and measures. 
The interpretation given by the Baale Ha-Tosafot on the end of this week’s reading also suggests connecting the passage on Amalek with the subject of weights and measures in a different way: “‘Undeterred by fear of G-d’ (Deut. 25:18)– in the matter of weights. This passage was juxtaposed to the passage, ‘You shall not have in your house’(25:14). Since [the Israelites] were not fearful of G-d in the matter of weights, about which it is said, ‘You shall fear your G-d,’ therefore Amalek came.” 
What is the connection between fear of G-d, falsifying weights and measures, and Amalek? Fear of G-d is the most fundamental quality that places every person before the Lord, along all axes of time and through all dimensions of space. Fear of G-d does not allow for a philosophical stance towards the Deity of a sort which is detached from the realities of actual life. It exists only in a world in which the Deity is perceived as significant to life, as watching over us and demanding an accounting. Amalek rejected the notion of a provident Deity  and therefore his own essence is defined as “undeterred by fear of G-d.” In contrast, the role of Israel in the world is to clarify the existence of a provident G-d, present in all walks of life, and therefore fear of Heaven is a fundamental quality in Israel. It precedes intellectual wisdom and understanding. For it is said, “The beginning of wisdom is the fear of the Lord” (Ps. 111:10), in order to eliminate any possibility that G-d be perceived purely philosophically. 
Amalek is an oppressor of Israel from the core. When Israel are virtuous, he has no power over them, but when they turn away from that position and see the Deity as philosophical but not provident, then he is more powerful than they and comes to smite them. Thus, the first time Amalek came on the scene to fight Israel was when “they tried the Lord, saying, ‘Is the Lord present among us or not?’” (Ex. 17:7) – words which challenged the faith in a provident G-d. 
The difference between a philosophical and a providential perception of G-d is not merely theoretical, rather it is primarily noted in the actual business of life. Where awe brings G-d into the walks of life, it draws together all the points: person, time and place, and creates a deep-rooted integral whole. All the seemingly separate particles which make up the reality of life are truly integrated into a unity, devoid of partial aspects, since the essence of all the particles is one and the same: to reveal G-d in our everday lives and to worship Him. But where G-d is removed from life and remains no more than an abstract concept, the particles can form a partnership but not an integrated whole, for they are not essentially drawn to a single point. This partnership is based on chance needs, devoid of a single goal; this describes the reality of Amalek’s life: “He surprised (Heb. kor’kha) you on the march – surprised is none other than chanced (miqre)” (Sifre). Even though such partnerships might be beneficent at their outset, they contain deep elements from what the Kabbalah calls “the world of divisiveness”, for each part pulls in its own direction, for its own benefit, and these elements come to prevail. 
Amalek’s method harbors a divisive power: “He who isolates himself pursues his desires” (Prov. 18:1), whereas Israel’s belief in Providence causes the fundamental unity of all the particles in practice to come into being. When Israel remove themselves from the Divine source, they fall into a state of divisiveness, and in this state Amalek’s might prevails over them, and he becomes a “great menace to Israel.” Thus, “‘When the Canaanite, king of Arad, ... learned ... he engaged Israel in battle’ – he learned that Aaron had died and that the clouds of glory had gone away, and he thought he had been given permission to fight against Israel.”  The clouds of glory enveloped Israel with Divine unity, and Aaron the priest personified this unity in practice, for it followed from this Divine unity that he “loved peace and pursued peace.” Indeed, Amalek could only strike at the stragglers, those separated from the people and expelled by the Cloud (see Rashi).  Therefore the demise of Amalek is dependent on remembering the Sabbath, for “it says remember with regard to Amalek, and it says remember with regard to the Sabbath, indicating that the two are equated” (Tanhuma, Tetze 7), for the Sabbath is a return to the root of Divine unity, before we descend to the particulars of weekday life.
The demise of Amalek follows from the very next passage on the commandment of first fruits, which deals with taking “some of every first fruit of the soil” (Heb. reshit) (Deut.26:2). One must place that commandment in apposition to “a leading nation is Amalek (Heb. reshit goyim Amalek)” (Num. 24:20). The pilgrimage with the first fruits draws together all the parts, taking all the life in the land on a path of focused repentance that ascends to meet the primal Divine point in the Temple; in contrast, Amalek embarks from his primal position on an incidental path, and strays farther and farther from it the more he gets down to particulars, and he does not return to the source, therefore his “fate is to perish forever” (Num. 24:20). 
The commandment of just weights and measures provides people an opportunity for inwardly examining whether they are G-d-fearing, whether they see themselves as connected to G-d or apart from Him. This idea is evident in the commentary in Bava Metzia 61b, which explains the reason for mentioning the exodus from Egypt in connection with weights and measures (in Parashat Kedoshim, loc. sit.) as follows: “The Holy One, blessed be He, said: It was I who distinguished in Egypt between the drop that would be a first-born and the drop that would not be a first-born; it is I who will exact compensation from those who bury their weights in salt.” G-d’s revelation in Egypt was on the level of a provident Deity going down to the smallest details at the very root of creation, distinguishing between one drop and another, from the primal point. One who lies in weights and measures is excluded from this recognition, for such a person does not fear G-d when he secretly buries his weights in salt (to corrode them and make them weigh less). When he separates the reality of life from the concept of G-d, he falls into a world of divisiveness, creating a rift between one person and his fellow, which finds sharp expression in fraudulent measures and weights. Here Amalek’s power prevails and Israel must worry about inciting the enemy.
When Israel was delivered from Egypt, their mission was to bring the world tidings and establish faith in a providential G-d by spreading as broadly as possible the united national experience, rooted in the Land of Israel. Then Amalek chanced upon them on their way to redemption, trying to silence their tidings, to separate life from G-d, to divide between one person and another, telling Israel that they would not come to the promised land;  hence the call for their utter annihilation. But the individual in Israel cannot be part of wiping out Amalek unless he is wholly integrated in his self, not torn apart and separated in his personality, but one in thought and deed.  “Remember – can that be in the heart [i.e., thoughts]? When it says do not forget, that means the forgetfulness of the heart. So how does one carry out the command to remember? With the mouth [i.e., deeds]” (Megillah 11a). Likewise for weights, it says in Bava Metzia 49a: “What is meant by an honest hin (a liquid measure)? Was not a hin actually an ephah? Rather, it is to say that your ‘Yes’ (Heb. hen) be honest and your ‘No’ honest, that you not say one thing and think another.” With regard to the Sabbath: “Remember the Sabbath day – can that be in the heart? When it says Observe the Sabbath day, that refers to observing in the heart. So, how am I to fulfill remember? That it be recited by your mouth” (Torat Cohanim, beginning of Parashat Behukotai 26:2). Regarding the way of the first fruits, an ascent that returns everything to the House of the Lord: “You shall answer and say [New JPS translation: You shall then recite] – teaches us that first fruits require confession (Jerusalem Talmud, Bikkurim 20b), complete repentance in thought and deed. 
 See the discussion in Berakhot 21b, especially Rabbi Judah’s argument.
 See Kli Yakar, loc. sit., who tries to elucidate the essential connection between Amalek and weights and measures.
 This commentary apparently relies on the beginning of Parashat Be-Har (Lev. 27:17): “Do not wrong [or defraud] one another, but fear your G-d,” since this expression, “fear your G-d,” does not occur in this week’s reading, nor in the parallel passage on weights and measures in Parashat Kedoshim (Lev. 19:35-37). But since weights and measures belong to the general subject of defrauding, this expression can be related to them, too. See the commentary of R. Joseph Bekhor Shor on this week’s reading, where he arrives at the same idea from a different direction.
 See the Netziv’s commentary, Ha’amek Davar, at the end of Parashat Shelah.
 Cf.: Shabbat 31a; Ps. 111:10, and the qualities given by Rav Kook at the end of Musar Avikha, The Quality of Fear, par. 1-2.
 Ex. 17:7, and Rashi’s commentary there, based on the Midrash.
 See Rav Kook, Olat Re’ayah, Part I, p. 257, regarding the proscription against greeting prior to prayers.
 Numbers 21:1; Numbers Rabbah ch. 16:11; Ta’anit 9a.
 See Megillah 12a, and the teachings of Sefat Emet on Purim (1883, 1893), and others, where he says that the misfortunes of Israel and their deliverance from Amalek on Purim followed a similar process.
 This is further elaborated in the teachings of Sefat Emet on Parashat Ki Tavo.
 See Numbers Rabbah 16:11, on Amalek sitting on the border, on the path of the Israelites entering their land.
 See Rav Kook (note 9, above), that an integrated personality is the root of one’s ability to bring peace to the world.
 See Maimonides, Hilkhot Teshuvah 2.3.