必须 and 必需 have the same pronunciation, but they can not be used interchangeably. Here are the tips on how to differentiate between 必须 and 必需.
必须 [bì xū] must, have to
can only be used before a verb or adjective to act as an adverbial and often used together with other verbs.
Today you have to go to work.
We must pass the exam.
You have to be better.
必需 [bì xū] essential, indispensable, necessary
usually used before a noun as an attributive, or used as a predicate or object, but can’t be used before a verb
These are the raw materials essential for industrial development。
Sunlight and water essential for plant growth.
These reference books are necessary to us.
☆☆☆☆☆ 必需 can form new words, e.g. 必需品, 必需营养素, 必需氨基酸, etc, but 必须 does not have this use.