If my schedule is posted in advance is my employer allowed to force me to leave before the end of my shift?
I can't speak for all locations but here's how it works in Florida and most "At will" / "Right to work" states in the US.
Can they make me leave early?
Generally speaking if you're not fulltime or have a contractual agreement for specific hours you can be sent home without pay at anytime during your shift. Only a handful of the more progressive states have rules related to this that might be relevant.
I am full time though! will I still get paid?
Depends... if your hourly fulltime, probably not. Some states do have protections though. Hourly fulltime they could also shift your hours around to accommodate for the loss of this shift. You can actually be "fulltime" and have well under 40 hours a week (short term) in order to keep you as a "fulltime" employee though they must hit a minimum average number of hours over several weeks. (I don't have the specifics on hand)
What if I'm salary fulltime? Well in this case you're probably still going to get paid. (otherwise you're employer is likely violating US labor laws) Generally speaking as a salary employee your paycheck is guaranteed. If you short your employer two hours they cannot dock your pay for the two hours missed! You basically can only be docked pay for missed hours as salary if you miss an entire day.
What should you do?
In my experience if you're sent home early it's because if you remained working that day it would not be cost effective for you employer. (they'd spend more than they'd benefit from having you stay) This can be a VERY bad sign depending on circumstances. If the building lost power, phones were out, etc. That's not too bad, just bad luck and doesn't say anything about you as a worker. It's only a REAL concern is if they just send you home because they have too many people on hand, or you specifically aren't profitable... Both such cases would imply if there was a layoff you're a potential candidate. (Best way to reduce this from happening is make your self a more valuable asset. The more valuable you are to the company the less they'll want to send you home.)
In the absence of more specific information, like type of work, country, etc...
TL; DR: Yes, they can.
Especially in retail scenarios, if work slows down for some reason, managers generally have discretion to send people home. In some cases there's a specific order (start with whoever's shift started earlier that day, whoever's closest to 40 hours, etc.), but in others who is sent home is also left to the manager's discretion.