Ending a sentence with a contraction is entirely valid in normal English.
I tried to force myself to eat the last bite of cheesecake, but I just couldn't.
Oh, go on. I'll eat this whole chocolate bar, even though I know I shouldn't.
No, really. I mustn't.
Really. Don't do it. Just don't.
Put a spider in her bed when she's sleeping? You wouldn't!
You two are going out, be we aren't.
Your ice-cream is tasty, but this one isn't.
You want to go to the mall? Yes, let's!
I can't remember sending that email, but I must've.
I didn't do it, but I could've.
The time now is eight o'clock.
How may I help you ma'am?
Greets, y'all! (warning: not standard English)
In fact, in the above, use of the non-contracted forms instead of the contracted-forms sounds stilted, although your point will still get across.
Note that there are some contractions where, as Bill points out in the comments below, one would not normally make use of them at the end of a sentence:
She's not going home for Christmas but I am (not I'm).
She's not going home for Christmas but we are (not we're).
You hadn't eaten a chocolate pudding, but I had (not I'd)
That experiment isn't awesome this project is (not project's)
That idea won't work, but this will (not this'll).
In Present-day US English you may go for years—I mean that quite literally—without hearing shan’t. The only people likely to say it are those with a taste for pre-WWII British literature who have picked it up from their reading.
Note, though, that you may also go for years without hearing anybody say I shall. This use was already defunct when I was a child in the 1950s, despite the efforts of schoolteachers to require shall in place of will in the first person. Today shall is reserved, even in formal writing, for
pronouncements of a legal or quasi-legal character; it no longer signifies ordinary prediction of the future, but future requirement:
The party of the first part shall make an accounting quarterly to the party of the second part.
rhetorical assertion of unshakeable determination:
They shall not pass.
I shall return.
ADDED at Peter Shor's suggestion: It's sometimes used in first-person questions as a polite suggestion: Shall we go? or Shall we postpone that til we know more?
So if your interlocutors employ shall, they have no cause for complaint if you call them out by responding with shan’t; and if they are puzzled, it will give you an opportunity to demonstrate your superior mastery of the English tongue by explaining, condescendingly, what I have set forth above.
Best Answer
I would use "don't" in all but the most formal of writing. (Like, wedding invitations, an academic paper). Certainly for things like: a business letter, a note that you put on your door, an e-mail to someone you respect, etc., contractions are fine and failure to use them will make your writing sound overly formal.
Even in formal writing, which I occasionally have to do, I try to slip in "don't" and "can't" unless an editor catches me.
I don't like the comparison to swearing at all. As a foreign language learner you should basically never swear unless you are completely familiar with who you are talking to and you are using only words that they already used in similar contexts; otherwise you face a grave risk of offending them. But half of the native English speakers don't even know the "rule" that contractions are informal. You should definitely learn to use them all the time.