Which sentence uses a verb that agrees with its subject?

A.
Many books was on the shelf.

B.
Many books were on the shelf.

C.
Many book are on the shelf.

D.
Many books is on the shelf.