What did Shakespeare believe? We can only guess. He left neither a diary nor a philosophical treatise. His only surviving letters and public statements are either conventionally – if supremely elegantly – phrased pleas for patronage, or words devoted to business transactions and legal cases. His will is orthodox and Anglican, but that is how wills were written. It doesn’t mean that he was orthodox and Anglican.
The only poems written in his own voice are the Sonnets. The man who wrote them clearly believed that love is a powerful and complicated thing, that poetry is an effective way of exploring its many dimensions, and – if his lines are to be taken at face value – that creative art is a way of achieving a kind of immortality for the beloved and perhaps for creative artists themselves. But his lines are not necessarily to be taken at face value. The “I” who speaks a poem, even an intimate love poem, is not synonymous with the person who writes the line. All poets rejoice in creating a persona. And if Shakespeare really believed that the purpose of writing sonnets was to immortalise the beloved, he might have taken the trouble to tell his readers the name of the addressee.