Definitely not. Shrek made its debut as an animated film and wasn't based on a comic book. However, its popularity led to various related products and media, but a comic book wasn't where it began.
Shrek wasn't a comic book to start with. It first came into being as a feature-length animated movie and later had various spin-offs and adaptations, but not in the form of a comic book initially.