How wide is the shelf? There's studs behind that wall, they s/b on 16" centers.
Another option (if you can use the studs in the wall to grip the fastener) is to use a SS hangar bolt; gives you the option to use a nice looking acorn nut for the exposed fastener. Others may weigh in, but with Hardi, do you need to worry about spacing the shelf from the wall? What's going to rot?