God says that church is mandatory, but even if you don't go, God will still listen to you. He will listen to anyone that talks to him or is willing to have a relationship with him. I just started going back to church regularly for the first time in a year, and I have been praying every night for five years. It has really changed my life, even though I haven't been a regular church-goer. I've just now started going to church regularly, and God has still been a big part of who I am. He will not shun you just because you don't go to church, even though it is imperative that you go.
Good question. You should read some of my hubs that I have posted about God. I think you'll like them.