Answer:
The main literary device used in Sonnet 18 is metaphor. It also uses rhyme, meter, comparison, hyperbole, litotes, and repetition. The main purpose of Shakespeare's Sonnet 18 is embodied in the end couplet: So long as men can breathe or eyes can see, So long lives this and this gives life to thee.