Unfortunately, there is no direct way to move IMAP email to an Office 365 shared mailbox. You have to download emails, convert them to PST, and use the Outlook Classic client’s import feature to add that data.
However, this practice is not feasible in organizational environments, so it is better to rely on a tool that is tested for all scenarios and trusted by all admins. You can find it on the other side of the link.