Remember that ofttimes the wisdom of God appears as foolishness to men, but the greatest single lesson we can learn in mortality is that when God speaks and a man obeys, that man will always be right.
You don't need organized religion to connect with the universe. Often a church is the only place you can go to find peace and quiet... But it shouldn't be confused with connecting with one's spirit.
There are two kinds of Riya - Showing off-Ostentation ie pure ostentation and adulterated ostention. In pure ostentation "Riya" a man does a good deed only for worldly benefit. In Adulterated ostentation, a man does a good deed with the intention of reaping the benefits of the world as well as of the Hereafter.
Wisdom always makes men fortunate: for by wisdom no man could ever err, and therefore he must act rightly and succeed, or his wisdom would be wisdom no longer.