Don't waste money buying things you don't need.

Literal

Necessary [not-でない] things [object-を] buying wasteful-spending [must-not-てはいけない].

むだ使いしてはいけない — むだ使い means 'wasteful spending.' 必要でない物を買って describes the context: buying unnecessary things. A practical money-management instruction.