“made a marriage alliance with Pharaoh.” The Hebrew is more literally, “became a son-in-law to Pharaoh,” but in this context, it means to make an alliance via marriage.
“took Pharaoh’s daughter.” We should note that Solomon did not marry Pharaoh’s daughter because he loved her, this was a commercial and perhaps military alliance with Egypt that was sealed by marriage, which was a common custom at that time.
Thus, even though the Bible says at this time in his life Solomon loved God (1 Kings 3:3), he was demonstrating some behavior characteristics that would eventually lead to his downfall. He compromised on the Word of God for “good reasons,” for example, in this case, it seemed to him that an alliance with Egypt would be good for Israel. But his father David did not compromise that way; he made treaties without compromising the Scripture by marrying pagan women. But Solomon had already married at least one pagan woman and had a child by her. Before Solomon even became king he married Naamah, an Ammonite woman, and had a son (Rehoboam) by her (1 Kings 14:21).
As we follow Solomon’s life through Scripture, we can see he made a number of compromises and bad decisions. For example, he ignored God’s commands about who to marry. Solomon eventually had 300 concubines (a concubine is a “lesser wife,” a wife from a lower class who was likely given to him as a present to gain influence or perhaps a girl of particular beauty who he noticed and took into his harem) and 700 wives of royal birth who were likely given to him to gain influence with him or as part of an alliance just as Pharaoh’s daughter had been. Solomon’s pagan wives eventually turned his heart away from the true God, and he ended up doing evil in the eyes of God (1 Kings 11:4-6).