The movie starts with the king ordering the fairytale creatures to be hunted, as a result of which most of them end up in his village. As an ogre who likes living alone, he does not like it and sets off to the court to the King to have him recant this policy.
In the meantime, the king announced a tournament to rescue the princess from the confinements of the Dragon. Shrek happens to arrive at the very moment when the tournament is at its peak and defeats all the contestants with ease. He asks the king to give fairytale creatures the freedom they deserve, whereas the King agrees and negotiates a deal: on the condition that he has to rescue the princess from the Dragon. By the way, he helped a donkey earlier who now follows him wherever he goes. So, he and his donkey, named “Donkey” sets off on an adventure to free the princess.
As anyone could have guessed, they succeed. Not only they do, but the donkey befriends the dragon. One more thing most people can guess by this point is that Shrek and the Princess whose name is Fiona by the way, fall in love. Donkey finds out about Princess Fiona’s curse but does not do anything about it yet.
Just when he is about to confess his love to her she is taken to the castle to marry that dude. He goes back to his hut with Donkey to grief until Donkey brings him back to the mind. Then he breaks the wedding and kisses her breaking the curse. And they get married and live happily ever after.