To answer your good question, let’s read Revelation 2:12-14, “And to the angel of the church in Pergamos write; These things saith he which hath the sharp sword with two edges; I know thy works, and where thou dwellest, even where Satan’s seat is: and thou holdest fast my name, and hast not denied my faith, even in those days wherein Antipas was my faithful martyr, who was slain among you, where Satan dwelleth. But I have a few things against thee, because thou hast there them that hold the doctrine of Balaam, who taught Balac to cast a stumblingblock before the children of Israel, to eat things sacrificed unto idols, and to commit fornication.”

The meaning of the ‘doctrine of Balaam’ is that the church of Pergamos taught substantially the same doctrine which Balaam did, and deserved to be classified with him. What that doctrine was is stated in the following part of the verse. Balaam taught Balac to “cast a stumbling block before the children of Israel.”  The meaning here is that it was through the direction of Balaam that Balak learned how to lead the Israelites into sin and might thus bring upon themselves God’s judgment.

What do we know about Balaam?  To find out about this man, we will read from Numbers 22:1-3, “And the children of Israel set forward, and pitched in the plains of Moab on this side Jordan by Jericho. And Balak the son of Zippor saw all that Israel had done to the Amorites. And Moab was sore afraid of the people, because they were many: and Moab was distressed because of the children of Israel.”  Moab was concerned because the nation of Israel was outgrowing the Moabites.  Balak was the king of the Moabites so, “He sent messengers therefore unto Balaam the son of Beor to Pethor, which is by the river of the land of the children of his people, to call him, saying, Behold, there is a people come out from Egypt: behold, they cover the face of the earth, and they abide over against me: Come now therefore, I pray thee, curse me this people; for they are too mighty for me: peradventure I shall prevail, that we may smite them, and that I may drive them out of the land: for I wot that he whom thou blessest is blessed, and he whom thou cursest is cursed.” (Verses 5-6)

Balaam consulted the Lord, asking if he should go with Balak and curse the Lord’s people.  “And God said unto Balaam, Thou shalt not go with them; thou shalt not curse the people: for they are blessed.” (Verse 12).  After Balak enticed Balaam to go with them, Balaam once again enquired of the Lord.  “And God came unto Balaam at night, and said unto him, If the men come to call thee, rise up, and go with them; but yet the word which I shall say unto thee, that shalt thou do.” (Verse 20).  This time the Lord allowed Balaam to go with Balak, but instructed him to only say the words that the Lord gave him to say.  The Lord refused to allow Balaam to curse His people.  He commanded Balaam to bless His people.  Although Balaam spoke as if he were a godly man, it was obvious that his desire was to get riches from Balak.  We read in Jude 11, “Woe unto them! for they have gone in the way of Cain, and RAN GREEDILY AFTER THE ERROR OF BALAAM FOR REWARD, and perished in the gainsaying of Core.”

While Balaam could not curse the Lord’s people, he advised Balak to seduce them by the Midianite women.  Numbers 31:16 says, “Behold, these caused the children of Israel, through the counsel of Balaam, to commit trespass against the LORD in the matter of Peor, and there was a plague among the congregation of the LORD.”  This led Israel to turn to idolatry.  Numbers 25:1-3 tells us, “And Israel abode in Shittim, and the people began to commit whoredom with the daughters of Moab. And they called the people unto the sacrifices of their gods: and the people did eat, and bowed down to their gods. And Israel joined himself unto Baal-peor: and the anger of the LORD was kindled against Israel.”  We see from all this that the ‘doctrine of Balaam’ speaks of the enticement to sin for earthly reward.  (362.2)