Shrek does relate to belonging, but his physical appearance has not allowed for assimilation into society. He has, consequently, become the animated personification of alienation, residing alone in the woods, content to frighten human interlopers who happen along or who gather into an angry mob in a futile attempt at scaring the ogre away. He is, however, a product of his environment, forced into an isolated existence following his rejection by humanity on the basis of his appearance (and highly questionable hygienic practices). An early window into Shrek's psyche is provided in an exchange with Donkey, who seeks companionship. Responding to Donkey's query regarding his demeanor, Shrek replies:
"Look, I'm not the one with the problem, okay? It's the world that seems to have a problem with ME! People take one look at me and go "Aargh! Help! Run! A big stupid ugly ogre!" They judge me before they even know me - that's why I'm better off alone..."
The cracks in Shrek's facade begin to occur when donkey enters his life and refuses to take "no" for an answer. Donkey is a naturally gregarious being who is the opposite of Shrek in terms of his innate desire for human companionship. Donkey wants nothing more than to live in peace among others and to enjoy their company, offering even to prepare waffles for breakfast. Shrek, however, unaccustomed to another living being's interest in befriending him, repeatedly rejects Donkey's entreaties and wants only to be left alone.
Donkey, however, isn't going away, and the two embark on a mission that further demolishes Shrek's isolation. Sent into exile by Farquaad, Shrek is surrounded by characters from fairy tales and, the only way to get rid of them is to go to the kingdom ruled by Lord Farquaad and set things right, which includes rescuing Princess Fiona. The rescue mission, and the struggle to rid himself of the invading fairy tale characters, forces Shrek to interact with other forms of "humanity" on a level heretofore impossible to arrange. The resulting activities, including the evolving relationship with Fiona, reveals the inner Shrek, the ogre who responds to civility with civility, and who is finally able to assimilate into mainstream society.
Shrek is a parable about discrimination and acceptance. Shrek is an outcast not by choice, but because he has been rejected by humans solely on the basis of his appearance. Once forced to acquiesce to the company of others, his acceptance of a state of social alienation gives way to his natural inclination to interact with humanity. Left unaddressed, however, is the proper role of personal hygiene in facilitating his alienation. And, the use of large quantities of ear wax for use as candle sticks is not likely to endear him to others. The revelation that Fiona is herself an ogre, however, eliminates once and for all the requirement for any further modifications in his personal conduct.