There's no actual law that makes it illegal to shovel snow out into the street.
However you might have some city code ordinances that prohibit you from shoveling snow into the street or some states may make it illegal to shovel snow into the street in those places.
For example in the state of Michigan it's illegal for people to shovel snow out onto the street.
But if you're in a smaller town it's unlikely that you would get into trouble for shoveling the snow into the street.
The best thing to do though is to shovel the snow to the sides of your yard which would then allow it to melt into the ground when the weather warms up.
I've shoveled snow out onto streets before in some towns and it never was an issue but in some certain places it can be illegal and can get you a fine.