It depends on the meaning you would like to express.
shouldn’t have and the past participle (shouldn't have worried) expresses the idea that something did take place but that it wasn’t desirable or needed:
EX: You shouldn’t have eaten so much chocolate, you’ll be sick. (you ate a lot of chocolate and it wasn't a good idea)
Needn’t have and the past participle (needn't have worried) is opposite in meaning to should have. It indicates that something was done, but that it was not necessary. That is, the person who did something thought it was necessary:
A: You needn’t have cooked a meal this evening. I had lunch at The Chinese Dragon with Tom.
B: Well, why didn’t you phone and let me know?
Source: British Council
Hope that helps.
- For Teachers