A shelf is a set with a binary operation ⊲ satisfying a ⊲ (b ⊲ c) = (a ⊲ b) ⊲ (a ⊲ c). Racks are shelves with invertible translations b → a ⊲ b; many of their aspects, including cohomological, are better understood than those of general shelves. Finite monogenic shelves (FMS), of which Laver tables and cyclic racks are the most famous examples, form a remarkably rich family of structures and play an important role in set theory. We compute the cohomology of FMS with arbitrary coefficients. On the way we develop general tools for studying the cohomology of shelves. Moreover, inside any finite shelf we identify a sub-rack which inherits its major characteristics, including the cohomology. For FMS, these sub-racks are all cyclic. 1 The former term is used in set theory, while the latter, coined by Alissa Crans, belongs to the topologists' vocabulary. 2 Following the set-theoretical and algebraic traditions, we use the left version of self-distributivity rather than the right one, more common in knot theory. The two are obviously equivalent.