To solve this optimization problem, we need to define the decision variables, objective function, and constraints. 

Let's denote:
- $L$ as the number of large bottles,
- $S$ as the number of small bottles.

The objective is to maximize profit. The profit per large bottle is $5, and the profit per small bottle is $3. So, the total profit can be represented as $5L + 3S$.

Constraints are as follows:
1. Budget constraint: The store has a budget of $1000. Each large bottle costs $3, and each small bottle costs $2. Therefore, $3L + 2S \leq 1000$.
2. Shelf space constraint: Each large bottle takes 2 units of shelf space, and each small bottle takes 1 unit. The store has 500 units available. Thus, $2L + S \leq 500$.
3. Small bottles percentage constraint: At least 50% of all stock should be small bottles. This can be represented as $S \geq 0.5(L + S)$ or simplified to $S \geq L$.

Now, let's write the Gurobi code for this problem:

```python
from gurobipy import *

# Create a new model
m = Model("Hot_Sauce_Optimization")

# Define the decision variables
L = m.addVar(name="Large_Bottles", vtype=GRB.INTEGER, lb=0)
S = m.addVar(name="Small_Bottles", vtype=GRB.INTEGER, lb=0)

# Set the objective function: Maximize profit
m.setObjective(5*L + 3*S, GRB.MAXIMIZE)

# Add constraints
m.addConstr(3*L + 2*S <= 1000, name="Budget_Constraint")
m.addConstr(2*L + S <= 500, name="Shelf_Space_Constraint")
m.addConstr(S >= L, name="Small_Bottles_Percentage_Constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of Large Bottles: {L.x}")
    print(f"Number of Small Bottles: {S.x}")
    print(f"Maximum Profit: {m.objVal}")
else:
    print("No optimal solution found")
```