Heres the deal with meal replacement bars and shakes: Calories are calories!
Why do people lose weight on them and then gain it back when they switch back to normal food? It's simple really. When you eat a meal replacement or a prepared diet meal, your calories are controlled by the portion size. The people who gain weight back after getting off meal replacements usually never learned portion control or proper nutrition when it comes to dealing with real food so they're cooking with higher calorie ingredients and having larger portions.
There's no secret to it. Does it mean they aren't helpful? Not at all, they can be very helpful. For example I have a pretty fast paced job and when I can only take a short lunch break, a meal shake does the trick. I was also on a 3 day road trip and instead of fast food I stuck to meal replacements, fruits, veggies, and homemade sandwiches. I don't personally condone trying to replace the majority of your diet with these products but they can help control your calorie intake when you have a limited amount of time or choice.