Recently I mentioned that working as a writer of forewords for other writer's books can be quite a lucrative little sideline and promised to follow up on this train of thought. Since I am nothing but a man of my word, I thought I might as well just jump right to it today.
The first thing to know of course is exactly how to write a foreword, since they do have a format and a rhythm all of their own. Forewords generally last for at least one and rarely more than two pages (it's not your book, after all) and like a story, has a beginning, middle, and end. The opening of the foreword should include a little personal touch or two, usually indicating how the foreword writer knows the author of the book. This gives both foreword and book a feeling of legitimacy, rather than making the reader think the writer of the foreword has done so solely for the cash (which may well be the case, but you don't want them to think that!).
Anecdotes relating to the author and the theme of the book are advisable for inclusion in the middle section of the foreword, giving the reader a sense that the book is written by someone who knows what they're talking about. Feel free to mention some of the book's strong points too (without giving anything away of course). Then conclude by stating why you wanted to write the foreword (again, don't say "for the cash") and sign off with your name, credentials and location.
p.s. Don't be backwards when writing a foreword.