I know "than" can be both preposition and conjunction and in this case it seems to serve as a conjunction.
But the sentence doesn't look right and I think the right sentence would be,
I would rather eat it than looking at it.
What are the grammatical rules behind this usage?