1 "You shall not sacrifice to the LORD your God any bull or sheep on which there is a blemish or any defect, for that is an abomination to the LORD your God.
2 "If there is found among you, within any of your gates which the LORD your God gives you, a man or woman who has wrought wickedness in the sight of the LORD your God, in transgressing his covenant, 3 And has gone and served other gods and worshiped them, either the sun, moon, or any of the host of heaven, which I have not commanded, 4 And it is told to you, and you have heard of it and inquired diligently, and behold, it is true and the thing certain, that such abomination is wrought in Israel, 5 Then you shall bring forth to your gates that man or that woman who has committed that wicked thing, even that man or that woman, and shall stone them with stones until they die. 6 At the mouth of two witnesses, or three witnesses, he who is worthy of death shall be put to death, but at the mouth of one witness he shall not be put to death. 7 The hands of the witnesses shall be first upon him to put him to death, and afterward, the hands of all the people. Thus you shall remove the evil from among you.
8 "If there arises a matter too hard for you in judgment between blood and blood, between plea and plea, and between stroke and stroke, being matters of controversy within your gates, then you shall arise and go up to the place which the LORD your God chooses. 9 And you shall come to the priests the Levites, and to the judge who shall be in those days, and inquire, and they shall show you the sentence of judgment. 10 And you shall do according to the sentence, which those of that place which the LORD chooses shall show you. And you shall observe to do according to all that they inform you. 11 According to the sentence of the law which they teach you, and according to the judgment which they tell you, you shall do. You shall not decline from the sentence which they show you to the right hand, nor to the left. 12 And the man who will do presumptuously and will not listen to the priest who stands to minister there before the LORD your God, or to the judge, even that man shall die. And you shall remove the evil from Israel. 13 And all the people shall hear and fear and no longer act presumptuously.
14 "When you come into the land which the LORD your God gives you, and possess it and dwell in it, and say, 'I will set a king over me like all the nations who are around me,' 15 You shall surely set him king over you whom the LORD your God chooses. One from among your brothers you shall set king over you. You may not set a stranger over you, who is not your brother. 16 But he shall not multiply horses for himself, nor cause the people to return to Egypt, to the end that he should multiply horses, because the LORD has said to you, 'You shall not return that way anymore.' 17 He shall not multiply wives for himself, so that his heart may not turn away, neither shall he greatly accumulate for himself silver and gold.
18 "And it shall be when he sits upon the throne of his kingdom, that he shall write himself a copy of this law in a book out of that which is before the priests the Levites. 19 And it shall be with him, and he shall read in it all the days of his life, so that he may learn to fear the LORD his God, to keep all the words of this law and these statutes, to do them, 20 And that his heart may not be lifted above his brothers, and that he may not turn aside from the commandment to the right hand or to the left, to the end that he may prolong his days in his kingdom—he and his children—in the midst of Israel."
[v.7] - Quoted in 1st Corinthians 5:13.
[v.14] - Reference, 1st Samuel 8:5.
[v.15] - "whom the LORD your God chooses" - The first king chosen by God was Saul. Reference, 1st Samuel 9:17.
[v.16-20] - David and Solomon were great kings of ancient Israel. In fact, they are both types and shadows of Christ; however, they were not messiahs. Take a look at 2nd Samuel 5:13, 1st Chronicles 29:3-5 (concerning David) and 1st Kings 4:26, 10:14-21, ch. 11 (concerning Solomon) and notice how verses 16 and 17 here apply to both David and Solomon in some fashion. Also note that David notably sinned against the Lord twice (2nd Samuel 12:13 and 1st Chronicles 21:8) and God stripped the kingdom from Solomon (1st Kings 11:11). Christ, on the other hand, is the sinless, eternal, King of kings. He fulfilled all of the necessary requirements to be the One King chosen by God. Concerning verses 18-20, Christ was the Word of God manifest in the flesh (John 1:1, 14); therefore, Christ was the fulfillment of the law (Matthew 5:17).