Use timber battens of that size and in those positions, but attach the shelf securely, at each end and at least one intermediate point, to the 1" face of each batten. No need to attach the battens to the cupboard sides. You might even get away with a single batten centrally positioned.
A 1x1...