I am playing around with wordpress and a few plugins. Say I have something called "Shopping Cart" and I delete the page. Then I recreate it, I can't have the old URL back. I get domain.com/shopping-cart-2 and I want the old one back. How can I do this?
You are asking about the slug of a page.
To change the URL part (also referred to as "slug") containing the name of your Page, use the "Edit" (or "Change Permalinks" in older WordPress versions) button under the Page title on the Edit screen of the particular Page, accessible from Pages tab of WordPress Administration Panel.
Please check the trash and remove the previous page from trash as well. Afterwards you should be able to re-use the previously used slug.