Veteran India pacer Mohammed Shami got the better of Prithvi Shaw in Bengal's match against Maharashtra in the Ranji Trophy.