All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Unseen matters cannot be taken except from the texts of revelation only, i.e. the Noble Quran and honorable authentic Sunnah of the Messenger of Allaah, sallallaahu ‘alayhi wa sallam.
As for the beast mentioned in the question, if it refers to the beast that Allaah The Almighty mentioned in the Quran and which is one of the major signs of the Hour, then the mentioned number has nothing to do with it. Whoever believes in that, he builds his belief on illusions and superstitions and it is not permissible for the Muslim individual to believe in them. That is because Islam came to liberate the Muslim mind from such nonsense.
Based on that, there is no harm at all in buying the products that bear that number (barcode) as long as they are Islamically allowed.
Allaah Knows best.