To set up rules for shared mailbox you need to open the shared mailbox in a separate browser window Outlook on the web (OWA),and then set up the rule in the shared mailbox browser window.
You may have options to different types of rules.
An typical inbox rule provides you more choices on the conditions and actions that can be taken on the incoming message. A sweep rule can be regarded as a special kind of inbox rule. The sweep rule allows you to quickly clean up your inbox and keep it tidy. You can automatically clear out old versions of the email when a new one arrives, ensuring only the latest email from a sender is in your inbox, referring to https://support.office.com/en-ie/article/Organize-your-Inbox-with-Archive-Sweep-and-other-tools-in-Outlook-com-or-Outlook-on-the-web-19eee6b9-09a1-4db6-b5d6-37644190884f.