Answer:
The correct sentence that uses a semicolon is: "For dinner we had pasta; fruit salad; homemade bread, butter, and jam; glasses of milk; and cookies, ice cream, and berries for dessert."
The other sentences contain errors in the use of semicolons.
In the first sentence, a semicolon is used correctly to separate two independent clauses. However, the second clause ("so we were able to buy everything we needed") is not a complete sentence, so it should not be separated by a semicolon. Instead, a comma or a conjunction such as "and" could be used to connect the two clauses.
In the second sentence, semicolons are used incorrectly to separate items in a list. Semicolons are only used to separate items in a list when the items themselves contain commas. In this case, each item in the list is a simple phrase or word, so commas should be used instead of semicolons.
In the third sentence, a semicolon is used correctly to separate items in a list that contain commas. However, the sentence contains a spelling error (desert instead of dessert).
The fourth sentence uses a semicolon incorrectly to separate two clauses. Instead, a comma or a conjunction such as "but" or "yet" would be more appropriate to connect the two ideas.
In a nutshell, a semicolon is used to link two independent sentences when the clauses are closely connected to one another and a conjunction or period would create too strong of a gap between the phrases. When the elements in a list itself include commas, a semicolon is also used to divide the items in the list from one another.