The Fifth Principle says that it is proper to pray only to God, and one may no pray to any one else besides Him.
We should not pray to an angel, to a star, a constellation or to a dead person (see here ), even if he was a great Tzadiq. We should not pray to any other element, entity or idea. We should pray exclusively and directly to God. Praying otherwise will be considered a form of idolatry.
It is also forbidden to pray to intermediaries, imagine that they will carry our prayers to God. We believe that God always listens to our prayers. Quoting Rabbi Hayim Pereira- Mendes: "God never fails to answer true prayer, unless in His wisdom He thinks it better for us that He should refuse, or if He finds us unworthy through sin".
According to Maimonides, the mistake of the generation of Enosh (=the civilization that existed after Adam, which mistakenly departed from God) was that they reasoned that since God created the celestial bodies to serve the world (like the sun and the moon) these creations are like the servants before the King. It is therefore fitting to praise, and honor them, because by honoring them, we are honoring the King. These people began to build temples for the sun and the moon, thinking that they were honoring God by that. That too, is idolatry. In other words, if one serves or prays to any entity or imaginary intermediary, even though one knows and declares that only God is the true God, it is considered idolatry.
Many times, people mistakenly believe that if their intentions are right, that is good enough. Given the seriousness of the prohibition of 'aboda zara (idolatry), a real God-fearing Jew should be extremely careful to pray only and directly to haShem, our God.
Read here the book: "Jewish religion ethically presented" by rabbi Hayim Pereira- Mendes.
See Israel Snapshot Beautiful photos from the Land of Israel. By Israel 365.