Did the epics of the Iliad and the Odyssey form the basis for those religions, or was it a religiously inspired text? I don't ever remember hearing about it being the basis for the Greek religion, always thought it was a creation of the Greek religion.
The works of Homer and Hesiod are the oldest known works of the Greek mythic cycles, and while the mythologies contained within them may be derived from an already existent theological system (it is believed that virtually all Indo-European polytheistic religions had some common theological source that is now lost), Homer and Hesiod doubtlessly defined theology to the Ancient Greeks by entwining such mythology with actual events of ancient Mycenaean Greek history. That's not to say Homer's poems were held to be some sort of Bible in ancient Greek temples, but along with Hesiod's works, their sheer extent and thoroughness of the myths contained within indicates that they doubtlessly formed the basis of Greek theological thought between the 8th century BC and the Christian era.
As well as how we currently read them. They aren't read that way anymore, and if you read them today, you don't read them assuming they're completely accurate, and that they describe real events. Which of course, doesn't really make much of a difference because the genius of the work isn't religious.
Obviously, most people today to treat them as mythological literature, although there are pagan re-constructionist groups that take them much more seriously and believe that they do have at least some measure of historical and theological truth in them, so that really just depends on your personal spiritual inclinations.
As for whether they are inherently religious texts, they are, above all else, texts of
Greek history and culture, and in the ancient world, the line between national heritage and religion was not so clearly defined since a peoples history was so tightly bound to their national mythology. I suppose you can argue that they aren't religious in the sense that their primary purpose isn't solely theological, but rather national. As I said earlier, though, spiritual beliefs were very tightly bound to national identity back then, so the line between religious identity and national identity was virtually non existent. National history and mythology were virtually inseparable, and to the ancients, they may not have cared to perceive any practical difference between the accounts of their ancestors and those of their Gods.