Sharon...Not clear on your question...can you repeat please?
I agree with Tinyshoes, please give more info with your question so you can get the help you need. What kind of railings-stairs, porch-and what kind of shelf, indoors, outdoors?
These hooks are usually flat metal that are bent at two places allowing the hook to wrap three sides of the railing. Usually they look the same as window box hooks
Hi Sharon: Here is a Home Depot site that shows what I think you're looking for. You have to scroll down a bit, but they're there:) https://www.homedepot.com/s/railing%2520planter?NCNI-5