S.H.
Is this a synthetic type finish or a wood shelf?
You need to sand it first. So that the paint can grip onto it. Then use a primer. Then paint it.
Or, ask the guy at the hardware store, what paint to get and how to prep the surface before painting it.
Acrylic Enamel, is a glossy paint.
And it will slip off. So you have to prep the subsurface of the shelf first. Then paint it.
You need to start over.
Sand the shelf.
Prime it.
Then paint it.