Shrek is the titular main protagonist of the franchise with the same name.
In the first movie, he's introduced as a villainous protagonist.
In the first film, Shrek was initially overly aggressive and hostile towards strangers who wander into his swamp, an example of this is when several villagers came to kill him but then were left terrified when Shrek described ogres as ten times worse than giants after they fled in fear, the ogre gave a hearty chuckle and warned them to stay out.
However, behind this tough demeanor, Shrek was incredibly insecure and sought recluse from everyone as they judged him as a monster before getting to know him and believed that he was better off alone. When meeting new people Shrek was heavily sarcastic, when meeting Donkey the first time and asked for a place to stay Shrek agrees only to say no the second time he asks. Due to all the people, he met Shrek was used to being treated like a monster and was left surprised when Donkey had no problem with his appearance or his ogre roots.
He roared at villagers, scared them to their death and wanted to kill them.
He grabbed Big Bad Wolf, hurt him and tossed him out of his house.
He was cruel towards Donkey and verbally abused him several times. At the beginning, he was willing to let Donkey die rather than be his friend.
He and King Harold were ruining family dinner, broke and destroyed several things.
He was cruel to Fiona after arguing with Harold and told her that he isn't meant to be kind gentleman, but a scary ogre.
He scared Fiona's little puppy to death.
Shrek 3 is the only movie where Shrek never commited villainous deeds.
Shrek Forever After
He roared the loudest he can and tried to scare others to their death, like in good old times.
He smashed a birthday cake after being angered enough by birthday party guests.
He verbally abused Fiona and told her that he doesn't want to be with her and kids anymore, but to be a scary ogre like in good old times.
He signed Rumpelstiltskin's contract just because he wanted to scare people to their deaths, and almost got everybody's lives ruined.
In paralel universe, after signing Rumpelstiltskin's contract, he enjoyed scaring people to their deaths, just like in good old times.