וַיִּתְחַתֵּ֣ן שְׁלֹמֹ֔ה אֶת־פַּרְעֹ֖ה מֶ֣לֶךְ מִצְרָ֑יִם וַיִּקַּ֣ח אֶת־בַּת־פַּרְעֹ֗ה וַיְבִיאֶ֙הָ֙ אֶל־עִ֣יר דָּוִ֔ד עַ֣ד כַּלֹּת֗וֹ לִבְנ֤וֹת אֶת־בֵּיתוֹ֙ וְאֶת־בֵּ֣ית יְהוָ֔ה וְאֶת־חוֹמַ֥ת יְרוּשָׁלִַ֖ם סָבִֽיב׃
Y SALOMÓN hizo parentesco con Faraón rey de Egipto, porque tomó la hija de Faraón, y trájola á la ciudad de David, entre tanto que acababa de edificar su casa, y la casa de SEÑOR, y los muros de Jerusalem alrededor.
Ralbag
Now King David was old: Until "Solomon married the daughter of Pharaoh." (1 Kings 3:1)
From David to Destruction
Rambam explains that these women underwent a conversion process, and were, technically speaking, Jewish at the time of their respective marriages to Shlomo HaMelech. Thus, we have cleared Shlomo HaMelech of the terrible sin of intermarriage. Rambam’s position is accepted as mainstream Jewish thought, as it is presented as the normative understanding in the Shulchan Aruch in its discussion of Hilchot Geirut (Yoreh De’ah 268), and is cited by Pashtanim including the Metzudat David (Melachim I 3:1), Ralbag, Malbim, and Da’at Mikra.
From David to Destruction
However, these justifications seem to ring hollow. After all, this conversion seems not at all to be motivated by a desire to find shelter beneath the wings of the Shechinah, as are Ruth’s motivations (as stated in Ruth 2). This marriage is described in Melachim I 3:1 as a means to forge an alliance between Paroh and Shlomo HaMelech, and not as an expression of Bat Paroh’s wish to draw close to God. Indeed, Rambam mentions that Bat Paroh’s conversion was administered by Hedyodot, meaning a less than stellar Beit Din (rabbinic court).
Rashi
And there was no war, etc. We learned in Seder Olam (ch. 16): “In the thirty-sixth year of Asa’s kingdom, Baasha, the king of Israel, advanced.” Is it possible to say so? Had not Baasha already died in the twenty-sixth year of Asa’s reign, as it is written (I Kings 16:8): “In the twenty-sixth year of Asa, king of Judah, Elah the son of Baasha reigned”? What then is the meaning of “In the thirty-sixth year of Asa’s kingdom”? This corresponds to the thirty-six years from the time that Solomon married Pharaoh’s daughter, for so it is written (I Kings 2:39-46): “and two of Shimei’s slaves ran away... And the king commanded Benaiah etc. and he smote (Sic) and fell upon him,” and immediately following this Scripture writes about Solomon’s marriage to Pharaoh’s daughter, i.e., immediately after those three years, and in the fourth year he married her, and he reigned forty years. We find that she was with him thirty-six years, and corresponding to them were the thirty-six years that the decree was issued upon the kings of Aram to be adversaries to Israel and finally to fall into the hand[s] of David’s sons. Therefore, it is stated: “In the thirty-sixth year of Asa’s kingdom.” In the sixteenth year of his reign, after Zerah the Cushite fell into his hand[s], that is the thirty-sixth year from Solomon’s death, and in the sixteenth [year] of Asa, the king of Israel and the king of Aram made a treaty to advance and provoke Asa. Asa sinned, as it is stated (16:2f.): “And Asa brought out silver and gold... saying, ‘Make (sic) a treaty between me and you...’ And Ben Hadad heeded.” And the kings of Aram did not cease being adversaries to Israel until Ahaz died, and in the third year of Ahaz, the king of Israel and the king of Aram made a treaty to advance and provoke Ahaz, and Ahaz had no merit that they should fall into his hand[s]; so they both fell into the hand [s] of Tiglath-Pileser, the king of Assyria.
Rashi
Only then did the daughter of Pharaoh. Who was originally in the city of Dovid, as it is stated in the beginning of the book, “and he brought her to the City of Dovid.”18Above 3:1.