Shakespeare did write poems, about five, narrative poems and sonnets. His sonnets are as highly rated as his plays and about 152 are attributed to him. (That is, it is possible that some are by admirers but this is not certain). During his lifetime, Venus and Adonis was his most widely printed work..
This was dedicated to his patron, Henry Wriothesley, earl of Southampton, as was his second poem, the Rape of Lucrece. He hadn't been college educated so was not considered a professional at that time. Poets had high status as sign of being cultured. Therefore, he stole time from his job as a playwright to write his poems.
Playwrights were quite lowly beings at that time, and suffered the closure of the theatres in 1592 because of fear of plague. Shakespeare became famous as a poet before recognition as a fine playwright. Because of the low status, he didn't even put his name on his plays for some time.