Open Adobe Photoshop. Create New document, dimensions 200x100 pixels, on white background. Took «single row marquee tool» and select picture on bottom horizontally, like on this picture.
Go to «Filter -> Noise -> Add Noise» . Chose Amount - 400, and Distribution set to Gaussian . Check Monochromatic checkbox. Now, go to Edit > Free Transform and drag high up to top op picture. Apply the transformation.
Select bottom middle part of image with rectangular marquee tool and delete selected to make white part.
Now, pick up Type tool from Tools palette, and click on left side white part you made. Type several numbers like real bar code have. Select numbers you typed, and change Font size to fit picture and look naturally. Also, pick Move tool and move that layer with numbers some left, right, up or down, if needed.
And there, you made bar code in Photoshop.
Adobephotoshop blog