Supermarket giant Woolworths has pulled a range of "racist" and "offensive" singlets from its shelves after a social media backlash.

The navy blue singlets are emblazoned with the Australian flag and in bold letters saying: "If you don't love it leave".

A Woolworths spokesman said the "totally unacceptable" singlets were inadvertently stocked in two stores - one in Sydney and one in Cairns - before being withdrawn from sale on Monday afternoon.

"The singlet was not one we ordered. It was delivered to us in error and should never been allowed on our shelves," the spokesman said in a statement.