As you've said that you're after a barcode in an "image", then I assume that you've already acquired the image. Then, all you need to do is feed the image, in a ROI descriptor and the barcode type into
Motion & Vision>>Machine Vision>>Instrument
Readers>>IMAQ Read Barcode.vi*
* assuming you've got the Vision toolkit installed...