If your barcodes do not contain the correct number of digits or have a extra proceeding or post digits, you can modify the data Shiptheory takes from barcodes in the advanced settings page on the Barcode page.
Clicking the small cog at the bottom left of the barcode scanning page, you should see these options:
Here you can specify what the barcode contains and if you'd like to remove any numbers from the start and end of it.
EG. You may use the order number, but for reasons out of your control, the barcodes you use have the order number inbetween zeros... so your order number maybe 55999 but the barcode gives 0005599900
In this case you'll need to change the 'ignore start ' barcode digits to 3 and the 'ignore end barcode digits' to 2 .