The best reference on this subject is "Shame, Exposure, and Privacy," by Carl Schneider, published originally in 1976 and out of print until 1992 when I asked W. W. Norton to reprint it and wrote a new introduction for the Norton edition. Carl is an ordained minister whose PhD thesis became this little gem of a book. Among the points he makes is that there is a healthy side of shame---called "awe" in religion---as when we compare ourselves to God. I have always liked the plaque on friends' boats "Oh Lord, thy sea is so vast and my craft is so small." Without a sense of shame, we cannot recognize the humanity of others.
James Fowler, whose landmark book "Stages of Faith" details the growth of religious maturity as an analogue of the search for enlightenment, has just released a new book with a similar title (I forget exactly) that takes our work on innate affect and the nature of shame and merges it with his own work on the development of religious sophistication. He deals quite well with the tendency of religions to use shame improperly, as well as the healthy side of shame. I had the privilege of reading the book in manuscript and recommend it highly---you can get the exact name from Books in Print at any bookstore. I'd give you more information about it, but my own final copy hasn't arrived yet!
Robert Atkins, PhD, pastor of the First United Methodist Church (100 West Cossitt Avenue, La Grange, IL 60525) has written an excellent article entitled "Pauline Theology and Shame Affect: Reading a Social Locution" in a special issue on "The Social World of Saint Paul" for the journal _Listening: Journal of Religion and Culture_, Spring 1996 issue. In it, Dr. Atkins asks us to revise our understanding of St. Paul's speeches and behavior in terms of what we now know about shame and suggests its relation to the culture of Paul's time. An excellent article, which, if you can't find it through a university library's interlibrary loan system, you can probably get from Dr. Atkins by writing him. It is, to my knowledge, the most accurate use of affect and script theory in current religious writing, although from the intensity of a discussion in my living room when the national meeting of religion professors took place here in Philadelphia a year ago, only the beginning of a tide.
One member of the Tomkins Institute who has become very very interested in the area of your question is Susan Leigh Deppe, M.D., a Vermont-based psychiatrist who has given a number of presentations on this all over the country. She will give a workshop on afect/script theory in religious counseling (and the importance of religion in psychotherapy) for the October meeting of the Tomkins Institute in Philadelphia. Click through the BOL system to read more about that meeting and her presentation.