In English writing, put the dollar sign before the number with no space, so you'd write I paid $50 for the tickets, never 50$.
One boundary: Canadian writing influenced by French convention sometimes accepts the sign after the amount with a space, though that's not an official rule.
Writing an invoice or receipt line? Put the sign straight before the number: Total due: $23.50. The sign sits tight against the numeral with no space.
Quoting a price in an email? Lead the figure with the sign: We can supply the chairs for $120 each. Your wording tells the client the offer is firm and ready to accept.
Listing a price in a menu or catalog? Keep the sign in front there too: Latte, $4.50. Readers scan down the column and expect the symbol first every time.
In US English writing, the dollar sign always goes before the amount with no space, so $120 is correct and 120$ is not.
Try one yourself: write a price like the cost of a movie ticket, putting the dollar sign before the numeral, then read the line aloud to check it sounds the way you'd write it, as in The tickets cost $50.
In English writing the dollar sign goes before the number with no space, so the correct form is Shipping costs $15. If your sentence reads Shipping costs 15$, the placement is reversed and it isn't standard; the sign has to move to the front, and the corrected sentence is Shipping costs $15.