There's already a barcode scanning program in the App store that does this. It uses the iPhone camera to scan the barcode and then you're given information on the product and prices from lowest to highest in you're local area. And it's free.
And this is hardly revolutionary. The CueCat back in 1999 had a lot of this functionality.