Diet shakes are safe to drink while you're pregnant as long as you're not using them to help you lose weight.
Dieting during pregnancy is not a good idea. If you need help managing your pregnancy weight gain, your practitioner can help you figure out how to eat a healthy diet and set up an exercise program.
Ready-made diet shakes are typically flavored, milk-based drinks with vitamins, protein, and fiber thrown in. They're not dangerous, and it's fine to have one now and then as a snack on the go. But to get the best nutrition for yourself and your baby, you're better off eating a variety of foods from all food groups.