What's the connection between being an illegal immigrant and having a valid ID?
In my experience as a traveller, any ID from any country is good enough to get a mobile contract. Some countries might check VISA status too, but any valid temporary VISA is generally enough.
The United States is a country that doesn't require any form of identification to have a phone number. You can buy a "burner phone" at any Walmart, with prepaid minutes and no contract, in cash.