The Buddha said that you do not have to believe in the gods if you do not wish to, leading some to believe that Buddhism is merely a philosophy. However, most adherents pray to their gods just as followers of other faiths do.
The most important rules of life are contained in the eightway path: Right view; Right intention; Right speech; Right action; Right livelihood; Right effort; Right mindfulness; right concentration.
Consider these carefully and you can see that the contain the ethical basis for ethical living and achieving the highest good.