In legal terms, a contract is any agreement between parties to exchange things of value, such as goods and services for cash. A simple handshake agreement is legally binding, but its terms are not always provable if a dispute arises. However, you don't necessarily need pages upon pages of legalese. A basic contract agreement often works best for a simple business transaction.
Describe your obligations, including the service you must perform to fulfill your obligations under the contract and be as detailed as possible. For example, if you are writing a marketing brochure for a customer, describe the length of the brochure, the purpose of the brochure and establish that you are only responsible for providing the text, and not the layout or design, for the brochure.