Sadly, some of the answere here are unrealistic.
As a consultant (I've been one for almost 20 years), you have limited ability to change the course of the IT culture in your clients. You can "suggest" process, you can try to iron out issues that exist with build promotion and version control, but in the end the client will do what they do because they sign the checks. If you are a proffesional, you try to do the best job for your client that you can, but you also recognize that you are in business to turn a profit and sometimes taking jobs like the one described above is necessary to pay the bills. They can be great learning experiences for what "not" to do with other clients.
Someone here suggested that it is unethical to take the position and charge the client, that is utter nonsense. There is nothing unethical about it if you are truly trying to help. There's a reason most consultants are paid by the hour (the smart ones), because our profession is much like being a lawyer. You get paid wether you win the case or not. You do everything you can to win within the constrainsts of the case, but in the end you are being paid for your time and expertise, not for a guarantee of success.
It has also been suggested (by the same person) that if you are an ethical consultant that you will never be wealthy, this is also rediculous. I don't know if I can be considered wealthy, but I (and many friends of mine) have made a very good living (upper 6 figures) as a consultant for more than a decade. We are all ethical and honest with our clients. In my experience the consultants who are not doing well financially either aren't very good or live in a market where there is little money. I'm fortunate enough to live in NYC where the consulting market bleeds gold (in a good way). Do not mistake poverty for nobility, the 2 are quite unrelated.
Eric