SAN FRANCISCO — Tax-free shopping is under threat for many online shoppers as states facing widening budget gaps increasingly pressure Amazon.com Inc. and other Internet retailers to start collecting sales taxes from their residents.

SAN FRANCISCO — Tax-free shopping is under threat for many online shoppers as states facing widening budget gaps increasingly pressure Amazon.com Inc. and other Internet retailers to start collecting sales taxes from their residents.

Billions of dollars are at stake as a growing number of states look for ways to generate more revenue without violating a 1992 U.S. Supreme Court ruling that prohibits a state from forcing businesses to collect sales taxes unless the business has a physical presence, such as a store, in that state.

States are trying to get around that restriction by passing laws that broaden the definition of a physical presence. Retailers are resisting being deputized as tax collectors.

Until recently, the Supreme Court ruling has meant that Walmart Stores Inc., based in Bentonville, Ark., would collect taxes from shoppers in all states with sales taxes, whether those shoppers buy items on or off the Web, because it has stores nationwide. But Amazon, based in Seattle, wouldn't collect taxes from Floridians because it doesn't have a presence there.

With the new laws, those living in Evanston, Ill., or Providence, R.I., can no longer expect to avoid paying taxes when shopping online even though Amazon and others have no traditional operations there. States backing these laws argue that a retailer has a physical presence when it uses affiliates — people and businesses that refer customers to the retailer's website and collect a commission on sales.