Whatever size wood screw where the head fits the flange, probably #8. Pick a length that won't come out the back of your shelf, accounting for the depth of the fitting, and pre-drill a hole that's slightly smaller than the shaft.
If your post above shows the exact fittings, you'll want a pan or...